Bug #2514
incorrect return values for get{First|Next|Last|Previous} methods
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
100%
billable:
No
vendor_id:
GCD
case_num:
version:
Related issues
History
#1 Updated by Ovidiu Maxiniuc over 9 years ago
The set of get{First|Next|Last|Previous} methods should return:
?
(unknown) if the query object handle is invalid;yes
if a new (virtual) row is found and available;no
if the query is not open or the next record cannot be found.
At this moment they return no
if case of error conditions and yes
otherwise (regardless if a new row is available or not). This means that if a procedure uses them to end a loop, it will break when trying to access an inexistent off-end row of the query.
#2 Updated by Ovidiu Maxiniuc over 9 years ago
Alternative working form for
IF (NOT qh:GET-NEXT()) THEN ...
is to rewrite as:
qh:GET-NEXT(). IF (qh:QUERY-OFF-END) THEN ...
This may give the fix solution to return in
GET-NEXT
the !QUERY-OFF-END
.#3 Updated by Ovidiu Maxiniuc about 9 years ago
- File om_upd20150218b.zip added
This update should fix the return values for respective methods.
#4 Updated by Eric Faulhaber over 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Sorry, I just came across this issue and realized I never reviewed this update separately. However, it seems this fix went into the trunk as part of revision 10904, so I am closing this issue.