Hi Laura,
I'm not sure which 'cookie' you're referring to.
If you are referring to the lock cookie then there have been several threads on this topic that
you should find helpful. I am just using an integer. As for the 'magic cookie' value, this value is siimply part of the .db file (the first value in the file actually) and identifies it as such.
As for deleting, my instructions say that I can reuse deleted records. So, when a record is to be deleted I set its flag to '1', or 0xFF as you say, but I don't remove it. Instead, the next time I need to create a record I reuse the first deleted record I find in the database. If there are not deleted records, then I actually add a new record when I need to create one.
Rich