Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR IN GETTING QUEUE

Status
Not open for further replies.

madreply

Technical User
Dec 6, 2011
9
0
0
I keep getting an error because of the GET().
First my code was:

FREE(qTest2)
LOOP i# = 1 TO RECORDS(Queue:Browse:1)
GET(Queue:Browse:1, i#)
IF ERRORCODE() THEN
MESSAGE(ERROR(),ERRORCODE())
BREAK
END
IF ... THEN !Filter -Condition
qTest2.Data = Queue:Browse:1.Data
ADD(qTest2)
END
END

But then it would just skip the whole loop like it wasn't even there, so i wrote it like this:

FREE(qTest2)
i# = 1
LOOP
GET(Queue:Browse:1, i#)
IF ERRORCODE() THEN
MESSAGE(ERROR(),ERRORCODE())
BREAK
END
IF ... THEN !Filter -Condition
qTest2.Data = Queue:Browse:1.Data
ADD(qTest2)
END
i#=i#+1
END

And the message is:
Entry Not Found.
Errorcode is 30

Does anybody know what could cause this error?
 
Hi!

If there are 4 rows in the Browse:queue:1 and you try to access the fifth row, it will return an error of Entry Not found. Change your code to ::

Code:
    IF ERRORCODE() = 30
       BREAK
    ELSIF ERRORCODE()
       MESSAGE(ERROR(),ERRORCODE())
       BREAK
    END

Your first loop code seems fine and the I think the problem is with your filter condition.

Regards


Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top