I programmed a query in Delphi 5. See the code below.
The Delphi progam uses BDE 5.01 and Oracle client 9i rel. 2.
OS is W2000 server
The query runs twice from beginning to end 1234 ...1234
if the total number lines is 20.
The query runs once (= correctly ) if the total number
of lines is 10.
There are many similar queries in the program but this is the
only one with such strange behaviour.
Thank you.
QDistCust.sql.Clear;
QDistCust.sql.Add( 'SELECT webuserid , surname, name , poffice FROM ANETA.vi_opx_2_send where brcode = '+(CurrentBRCODE) + ' order by surname ' );
QDistCust.Active:= FALSE;
QDistCust.Active:= TRUE;
try
QDistCust.DisableControls;
QDistCust.First; // Last;
while not QDistCust.Eof do begin // bof
WEBUSERID := QDistCust.Fields[0].asString;
SURNAME := QDistCust.Fields[1].asString;
NAME := QDistCust.Fields[2].asString;
POFFICE := QDistCust.Fields[3].asString;
.....
QDistCust.Next;
end; // while
finally
QDistCust.sql.Clear;
QDistCust.EnableControls;
end;