Hi all,
I am struggling Error Messages popping up when they shouldn’t do it.
I have a simple loop but when no record is found, despite of what code version I use (see below) a message box appears “Record not found”. I don’t get it, why is that message popping up when using TryNext or doing the loop in the legacy way?
The option “Suppress Error Messages” in the WebServer procedure is checked so that cannot causing this. Furthermore the app is running on my desktop and not as a service. Didn't try yet what happens if I remove the SelfService template.
My two versions of code:
TTM:SessionId = p_web.SessionId
TTM:ActiviteitRegelID = 0
SET(TTM:TTM_pkey,TTM:TTM_pkey)
LOOP UNTIL Access:TagTerugmelden.TryNext()
IF TTM:SessionId <> p_web.SessionId THEN BREAK .
DO Something
END
TTM:SessionId = p_web.SessionId
TTM:ActiviteitRegelID = 0
SET(TTM:TTM_pkey,TTM:TTM_pkey)
LOOP
NEXT(TagTerugmelden)
IF ERRORCODE() THEN BREAK .
IF TTM:SessionId <> p_web.SessionId THEN BREAK .
DO Something
END
Hi Kevin,
Thanks, but that is not the problem. I already had several debug points like you suggest and I am sure the file is open. In fact the loop is working good. There is some counting done in it and the result is as expected.
It seems that the error which breaks the loop as it should do is not “cleared”. To be sure I put a message myself after the loop. That message appears first and then the error message is appearing. Strange, it must be a setting of NetTalk somewhere but I cannot find it. Sure it is not the option “Suppress Error Messages” in the WebServer procedure what is missing because that one is checked.
TTM:SessionId = p_web.SessionId
TTM:ActiviteitRegelID = 0
SET(TTM:TTM_pkey,TTM:TTM_pkey)
LOOP
NEXT(TagTerugmelden)
IF ERRORCODE() THEN BREAK .
IF TTM:SessionId <> p_web.SessionId THEN BREAK .
NumberTagged += 1
END
MESSAGE('NumberTagged: ' & NumberTagged) ! Is popping up first
! And now the error message pops up.