0

I have a VB6 application that uses a mdb file with Jet.OLEDB.4.0. The application does a good job of saving and retrieving data unless I let it set idle with an open recordset for half an hour or so.

If I let the application set idle for awhile and then try to use the application again, it looses records. It appears that something, data or dlls, is automatically moved out of ram during the idle period and can't be reloaded fast enough so everything is coordinated and all the records are there when I begin using the program again.

If I could tell when Windows was about to move things to ram, I might be able to fix the issue by updating the recordsets to disk with a sql update command just before the move and setting a boolen variable to remind the program to reopen the connections and recordset when the application user returns to the program.

I don't know how to tell when Windows is going to or has to moved things out of ram. Is there a way to know when Windows is about to move thing out of ram and has moved things out of ram?

  • It is hard to know what might be going on here. Altered connected Recordsets need to be Updated before lock timeouts expire, which might be one source of such a problem. – Bob77 Jan 19 '13 at 02:02

1 Answers1

0

Is there a way to know when Windows is about to move thing out of ram and has moved things out of ram?

Not really in VB6. I would try to test the connection periodically with a timer. Something like a 10 second interval won't put much stress on the system at all. You can test it to see if and when it closes, if anything else was happening at that time. Check your OS logs. You might find that it never closes with the slow timer checking, and it might be your solution.

djv
  • 15,168
  • 7
  • 48
  • 72