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
Position after msQuery1.execute
Re: Position after msQuery1.execute
Hello,
It is not necessary to call the First method. After calling the Execute method cursor will be automaticaly set to the first record.
It is not necessary to call the First method. After calling the Execute method cursor will be automaticaly set to the first record.