Re: EDS Database Problem
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Jun 12, 2005
- 523 views
EU Coder wrote: > > Hello All, > > I have a EDS database and I created a simple procedure to delete a selected > record from the database. But there seems to be a problem with deleting the > correct record from the database. The procedure is finding the correct item > and returning the correct record number, but when > db_delete_record(findrecord) is called the last record in the database is > deleted, no matter what record is selected. Anyone have a clue what I am > doing wrong? I think that the file buffer isn't getting flushed for some reason when the program exits. Perhaps the activex is prematurely shutting things down, and Euphoria doesn't get a chance to flush the buffers. There seem to be several ways to solve this. One is to remember to call db_close() when you're done. You should do this in your onClose procedure as well as a crash routine, just in case. Alternatively, you could add calls to flush at the end of the various db_XXX() routines that write something to the database. I wouldn't recommend this, because it could harm performance if you do something that strings together many database calls. Matt Lewis