This project has moved and is read-only. For the latest updates, please go here.

Bookmark assistance

Jan 23, 2012 at 5:06 PM

I am using the Esent.Interop as the datastore for a small application in which I have a wpf 4 datagrid to present the data in a particular table.  For a delete operation I'd like to get the bookmark for the previous record so that I can seek to the bookmark after the delete.  I am having difficulty interpreting what the args should be for the Api.JetGetBookmark method.

Does anyone have a quick sample of a getbookmark / gotobookmark usage?



Jan 23, 2012 at 5:48 PM

BTW, I am using C#...

Jan 24, 2012 at 4:39 AM

To answer the question you asked, look at the DMLCurrencyTests.cs file included with the tests.

To answer your scenario:

Docs for JetDelete ( ) say:

'On success, the currency is left just before the next record. If the deleted record was the last in the table, the currency is left at the end of the table (that is, after the new last record). If the deleted record was the only record in the table, the currency is set to the beginning.'

That means that after you do the Delete, you can do a JetMove( JET_Move.Previous ).

Good luck!