NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: JohanR on June 11, 2013, 11:56:04 PM
-
Been trying to resolve an error on some handcode that I inserted in a procedure routine
I then created these 3 blocks of code to try and check where it's failing
The first 2 fails to open the file,
the last, classic low level legacy code works
Any ideas where this is going wrong
Are there any gotchas for opening and closing of files in routines?
Where are the errors reported if it has errors?
TIA
Johan
! fails
do openfiles
set(pay:payment_isn_key,pay:payment_isn_key)
next(payment)
if error()
message('do openfiles:' & error())
end
! fails
p_web._OpenFile(payment)
set(pay:payment_isn_key,pay:payment_isn_key)
next(payment)
if error()
message('p_web._OpenFile(payment):' & error())
end
!works
open(payment)
if error()
message('open(payment) ' & error())
end
next(payment)
set(pay:payment_isn_key,pay:payment_isn_key)
if error()
message('open(payment) next' & error())
end
-
Are you trying to fetch a record or loop through a file? Either way it is not openfile failing it is accessing the data in the file
try something like this to fetch
do openfiles
pay:payment_isn = xxx
If Access:Payment.Fetch(pay:payment_isn_key)
message('do openfiles:' & error())
End
-
what procedure type?
what files are listed in the OpenFiles routine?
Is the app Legacy or ABC?
If you look in the OpenFiles routine, what do you see there?
cheers
Bruce
-
Hi Bruce
ABC web app, multi dll.
I have recompiled all apps, including data dll.
Is there a way to switch on error reporting on file access, to have them logged to a certain file or similiar?
Perhaps I should check in the file access class.
thanks
Johan
The files are listed in the routine as below
OpenFiles ROUTINE
! Start of "Beginning of Procedure, Before Opening Files"
! [Priority 5000]
! End of "Beginning of Procedure, Before Opening Files"
p_web._OpenFile(invoice)
p_web._OpenFile(cctrans)
p_web._OpenFile(client)
p_web._OpenFile(ccnr)
p_web._OpenFile(payment)
p_web._OpenFile(payitem)
FilesOpened = True
! Start of "Beginning of Procedure, After Opening Files"
! [Priority 5000]
-
Hi,
Got it fixed,
thanks Kevin
It was my legacy access code that was the problem.
Was a piece of code I copied from legacy app.
Still interesting why a legacy next(file) would fail, without using the abc equivalent.
Johan
-
I think you were just missing pay:payment_isn = xxx before the set