Closing connection/database/recordet objects

Alexandre

Registered User.
Local time
Tomorrow, 00:37
Joined
Feb 22, 2001
Messages
791
Lastly I decided to further prepare my database for future utilisation in a multiuser context (10 simultaneous users to the maximum). Namely, I reviewed all the code using connection / database or recordsets objects in order to:
1) reduce risks of conflicts, using readonly recordsets/snapshots, and transactions whenever possible
2) properly reset these objects (using .close and set X = nothing) at the end of each procedure/function.

I faced many difficulties I could not understand after resetting these objects: the database would not behave properly anymore. Why ? These are all local variables. Isn t Access supposed to 'forget' about them anyway? So what difference does it make if I close or reset them to nothing when I am done using them in my procedure/function?
In my view it was just supposed to free up memory and eventually free programatically locked records more rapidly?

Are there objects I should close and other not? Or should I undertake these actions only under specific circumstances?

Finally, is it or not usefull to use DbEngine.Idle under A2K after relatively heavy recordset manipulation?

Thank you in advance for the insights.

[This message has been edited by Alexandre (edited 04-06-2001).]
 

Users who are viewing this thread

Back
Top Bottom