Board index » delphi » Saving dataset location between sessions

Saving dataset location between sessions

I sthere a way to save the last dataset location between sessions? I
have an app with a single table with many records. When the uses exits
I would like to save the last record location and restore it when the
user next uses the program. Tried saving dataset.Bookmark to ini file
but that doesn't work.

___
Michael E. Fullerton | The Delphi Compendium
http://www.{*word*104}-matrix.com/delphi.htm

 

Re:Saving dataset location between sessions


Wouldn't saving the record's primary index values do the trick?

John Bleau

Re:Saving dataset location between sessions


Michael,
    I'm working on an app where I want to do the same thing.  Though not
tried yet, I was going to save the primary key to a plain text file or
another table when exiting, and then do a Locate or FindKey based on this
value when loading the table the next time.  I don't know if this is the
best soulution, but it just might work.

-Dave

Quote
"Michael Fullerton" <cmat...@spamkiller-remove.home.com> wrote in message

news:3a61cace.67840359@forums.borland.com...
Quote
> I sthere a way to save the last dataset location between sessions? I
> have an app with a single table with many records. When the uses exits
> I would like to save the last record location and restore it when the
> user next uses the program. Tried saving dataset.Bookmark to ini file
> but that doesn't work.

> ___
> Michael E. Fullerton | The Delphi Compendium
> http://www.{*word*104}-matrix.com/delphi.htm

Re:Saving dataset location between sessions


You can also save the key in the Registry or in an .ini file...

[M]

Other Threads