Hi,
For a few days now I've been struggling with this. I have a single record SQLite3 table linked to a form through a TSQLQuery and controlled using a TDBNavigator. When '+' is clicked on the navigator to add a second record the new record is created using TDataset.Insert and prepared for data entry. All goes well until it's time to Post the record. The app then crashes and breaks whilst updating the indices at TDoubleLinkedBufIndex.InsertRecordBeforeCurrentRecord() in BufDataset.pas at line 1916. It looks as though FCurrentRecBuf[IndNr].prior is undefined when perhaps it should be nil or a valid pointer. If instead I explicitly call TDataset.Append to create the record everything works and the record is successfully added to the table even though InsertRecordBeforeCurrentRecord() is still called. Can't see where the problem is but it seems that somewhere in the if ... else... or DoAppend subprocedure of TDataset.DoInsertAppend() the index records are not initialised correctly for Insert to succeed.
Yes, I now have a workaround but it's unfortunate that I have to build additional functionality instead of using a standard component. Can anybody explain what is happening and provide a fix?
Cheers!