我在DATAGRID控件中指向某一记录时,用ADORST.DELETE删除记录时,是删除的是当前记录吗?如何才能用BOOKMARK属性指向删除的记录?有没有介绍BOOKMARK的文章?

解决方案 »

  1.   

    如果记录集没有移动过的话是第一条记录,不是当前记录,要删除DATAGRID1中指向的记录,需要在Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)事件中找到相应的记录,然后再删除
      

  2.   

    Book Property (ADO)Returns a book that uniquely identifies the current record in a Recordset object or sets the current record in a Recordset object to the record identified by a valid book.Settings and Return ValuesSets or returns a Variant expression that evaluates to a valid book.ResUse the Book property to save the position of the current record and return to that record at any time. Books are available only in Recordset objects that support book functionality.When you open a Recordset object, each of its records has a unique book. To save the book for the current record, assign the value of the Book property to a variable. To quickly return to that record at any time after moving to a different record, set the Recordset object's Book property to the value of that variable.The user may not be able to view the value of the book. Also, users should not expect books to be directly comparable—two books that refer to the same record may have different values.If you use the Clone method to create a copy of a Recordset object, the Book property settings for the original and the duplicate Recordset objects are identical and you can use them interchangeably. However, you cannot use books from different Recordset objects interchangeably, even if they were created from the same source or command.Remote Data Service Usage   When used on a client-side (ADOR) Recordset object, the Book property is always available.