Position after msQuery1.execute
Posted: Mon 04 Jun 2012 10:01
For performance-reasons I ask me, if always the first record is selected after an execute-command or if I have to call Query1.First to be shure that it is the first record. Example:
Query1.SQL.Text := 'SELECT * FROM myTable ORDER BY myField';
Query1.Execute;
Query1.First; //Is this line necessary?
WHILE not Query1.eof do
......
Thanks for your answer, Peter
Query1.SQL.Text := 'SELECT * FROM myTable ORDER BY myField';
Query1.Execute;
Query1.First; //Is this line necessary?
WHILE not Query1.eof do
......
Thanks for your answer, Peter