Project

General

Profile

Bug #2514

incorrect return values for get{First|Next|Last|Previous} methods

Added by Ovidiu Maxiniuc over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version:

om_upd20150218b.zip (12.7 KB) Ovidiu Maxiniuc, 02/18/2015 02:41 PM


Related issues

Related to Database - Bug #2625: query-off-end does not work properly Closed

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

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.

Also available in: Atom PDF