Records not saving correctly

Steve Albin steve at steve-albin.com
Tue May 1 15:55:20 CDT 2007


I have an app that was working fine while built with V4RB 2.4.3.  I decided to make some minor changes and upgrade to 2.5.9 along the way.  

I have one table in my database that is pitching a fit.  I save records with the app and everything looks fine.  I can display and redisplay these records fine.  But if I quit my app and reopen the database, the records will not display.  

When I open the database in VStudio, the records will not show up properly.  If I list Table A (the one containing the bad records) the records will not display.  But, if I list Table B (which has an object ptr link to Table A) then I can see some corrupt records.  If I click on the record in Table B that I attempted to update, and then list the linked records in Table A, the list for Table A will show the correct number of records, but each record contains the same data as the first physical record of Table A.  



Again, why my app is running and I am updating, everything looks fine.  It is when I quit the app and reopen (and sometimes if I just reindex) that the newly added records disappear.  And when I try to add records again, I get a error telling me I'm trying to use a duplicate unique key.  This is because on DB open, I retrieve the last entered record and get the sequence key.  While the DB is returning the key for the last "good" record, it is storing the keys of the missing records somewhere and won't let me reuse them.

I've checked that I am flushing the cache after each update.  I also flush the cache before quitting and closing the DB.  Because everything is fine until I quit the app and reopen, I feel the error must be in updating the database from cache.  Can you give me any hints at what else to look for on this?  The app works fine in V4RB 2.4.3, so I know my code worked at one time.  Maybe I had some bad coding that an upgrade along the way "fixed".

I'd like to make a small app that shows this, but I can't make this happen in a DB created in 2.5.9 - only in my DB from 2.4.3 converted to 2.5.9.



Steve

-- 
Steve Albin - Montclair, NJ
http://www.jazzdiscography.com/
http://www.steve-albin.com/


More information about the Valentina mailing list