How to close connections immediately?

Elisa

New member
Joined
Dec 17, 2002
Messages
3
Sorry the question is maybe stupid but I am newbie ... :)
In VB 6 I used to utilize 1 connection (i am working with Access) for each form, open at the loading and closed at the unloading of the form. Now in .net I see that "connection_name .close()" does not close immediately the object ... and this causes to me a lot of problems: If I came back on the same form after some seconds I find that the previous connection is still active (I think) and I see old data on the form. I have read the existence of a "dispose" method but I dont know how to implement it ...
Is there some better way to keep my forms "clear"???
Thank you
Elisa
 
Calling the Close method of a connection object will close the connection, but it will not destroy the connection object, nor will it clear values that are stored in other objects that may be associated to data retrieval. Make sure youre not caching values elsewhere.
 
Back
Top