tquery有一个属性叫做recno:
帮助文件是这么说的:
Indicates the current record in the dataset.
property RecNo: Longint;
Description
Examine RecNo to determine the record number of the current record in
the dataset. Applications might use this property with RecordCount to iterate
through all the records in a dataset, though typically record iteration is
handled with calls to First, Last, MoveBy, Next, and Prior.
Note: If accessing Paradox tables, RecNo can be set to a specific record
number to position the cursor on that record.
如果这个属性解决不了(例如paradox表),那就只好移一个就自己记录了。或者从第一个挨个
匹配(效率很慢,特别是数据量大,我就试过)