vb6 and Access
Posted on 2014-07-18
My project is written in VB6 and uses Access 2000 databases. This code has been in service for several years without incident.
I have some code where database updates are saved and then the code goes back to the form which called it.
I am populating one or more fields in a table. I go through and do an update, and then go to the bookmark to move the record pointer back.
When I update one particular field that I am watching through the debugger, if this is a new record, first time through, and the only one in the table, I can watch the update take place. Field course1 is updated with the value from a text box. Then I do the update. Since this is the only record, the debugger still points at the first record and shows the record is populated properly. However. there will be later instances where additional records will be added to the table. So, I set the bookmark before the update, do the update, set back to the bookmark, and the updated field is back to null. Later code causes the app to quit since that field is not properly populated.
So, I come back in using the same db and table for another attempt. There is one record in the table, although incomplete. I go through the populating and updating the second time through and it remembers the updated field value.
I cannot imagine what is going on here. Any ideas? Or where should I look?