Board index » delphi » Exception "Bookmark is Invalid"

Exception "Bookmark is Invalid"


2005-02-01 06:19:18 PM
delphi106
I'm porting a BDE application into ADO and, normally. I am finding some
problems.
This is one of these :
x := myADODataSet.GetBookmark;
.....
' Code that modify myADODataSet, appending records and moving cursor
.....
myADODataSet.GotoBookmark(x) // Here the exception "Bookmerk is invalid"
I'm using
- Dephi 5 (with all ADO patches applied)
- Access 2000 and Jet 4.0 OLE DB Provider
The problem is how I can take trace of the position in the dataset.
Thank you
Marcello
 
 

Re:Exception "Bookmark is Invalid"

Quote
Your code works for me. What settings are you using with your
TadoDataset?
--
Hi Brian,
here is the part of code
Punta := IntAdoQuery.GetBookmark;
if IntCausali['CSM_EXD'] = 'P' then
Distinta.Esplodi(IntAdoQuery, True,
IntCausali.FieldByName('CSM_STX').AsString)
else
Distinta.Esplodi(IntAdoQuery, False,
IntCausali.FieldByName('CSM_STX').AsString);
IntAdoQuery.GotoBookmark(Punta);
IntAdoQuery.FreeBookmark(Punta);
IntAdoQuery has the following settings :
. CursoorLocation : ClUseClient
CursorType : cltDynamic
LockType : ltBatchOptimistic
Maybe the problem is in the "Distinta.Esplodi" procedure that use
IntADOQuery (the first parameter) for updating the dataset and can call
itsef recursively.
Any idea?
Marcello