[Progress Communities] [Progress OpenEdge ABL] Forum Post: rereadnolock causes non-forward-only query to read first table twice

Status
Not open for further replies.
C

cverbiest

Guest
Following sample demonstrates the issue. In a session with -rereadnolock the number of records read from the first table is double the number of records available in the table. find _file where _file._file-name = "customer" no-lock. find _tablestat where _file._file-number = _tablestat._tablestat-id no-lock. def var qh as handle. def var count as int. def var startread as int. startread = _tablestat._tablestat-read. create query qh . qh:forward-only = false. qh:set-buffers(buffer customer:handle, buffer salesrep:handle). qh:query-prepare("for each customer, first salesrep of customer"). qh:query-open(). do while qh:get-next(): count = count + 1. end. qh:query-close(). find _tablestat where _file._file-number = _tablestat._tablestat-id no-lock. disp count startread _tablestat._tablestat-read _tablestat._tablestat-read - startread label "diff" with no-box side-labels.

Continue reading...
 
Status
Not open for further replies.
Top