Query->Insert()问题。急!!!!
Query的数据显示在DBGrid中,插入(insert)一条记录,位置在当前记录的前一条,
但当指针移到另一条记录时,刚插入的这条记录就跑到了末尾(DBGrid显示如此)。
问怎么样解决不让它跑到最后一条。
问题点数:50、回复次数:4Top
1 楼bpaibgy(东东)回复于 2003-07-03 12:05:38 得分 0
没有知道为什么insert以后记录会跑到最后吗?
Top
2 楼pazee(耙子)(今年过年不收礼,收礼只收尿不湿)回复于 2003-07-03 12:08:13 得分 20
这是索引的问题。
你合理的设置索引。比如按照插入的时间Top
3 楼nanhui(晖)回复于 2003-07-03 12:37:51 得分 20
Description
Call Insert to:
1 Open a new, empty record in the dataset.
2 Set the active record to the new record.
After a call to Insert, an application can allow users to enter data in the fields of the record, and then post those changes to the database or change log using Post. (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) A newly inserted record is posted in one of three ways:
For Paradox tables with primary indexes, the record is inserted into the dataset in a position based on its index.
For Paradox tables without primary indexes, the record is inserted into the dataset at the current position.
For dBASE, FoxPro, and Access tables, the record is physically appended to the dataset at the end. If an index happens to be active, the new record may appear in a position relative to the index, but the record is still actually stored at the end of the table.
For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record information.Top
4 楼yingyys(鹰)回复于 2003-07-03 12:53:02 得分 10
设置索引吧Top




