"rowid" is a string field. So I suggest to store the value of the rowid field in a variable, and later on use TAdsQuery.Locate('rowid', my_variable, []) to reposition the grid. Usage DisableControls/EnableControls is recommended, ideally the user don't see any scrolling.
RowID is a virtual column calculated from the physical position of the record ... I'd rather use a primary key field to locate the correct record (rowid might change when inserting/deleting/updating records).
1. Prepare/UnPrepare has no function in Delphi ADS Components. You can see this in the source code: "Description: indicate prepared, but really do nothing" (Prepare function).
2. Use ROWID pseudocolumn of Table "a" for this.
Thanks, for your answer. So I don't have to care for Prepare/UnPrepare.
regarding 2:
I would use: "select rowid, field1, field2, ... from a where id not in (select id from b where key = :Key) sort by name". But AQuery.FindField('rowid') is nil. How can I read this rowid?
And: how can i reposition to that rowid after a Close/Open?
Add comment