vidyajayakar
Member
[RESOLVED] Best way to connect?
I'm using OleDb to connect to an Access Database. I have several controls on my form, and most of the controls are populated based on the values chosen by the user in the previous controls.
Now, is it a good idea to store the connection information as global variables (shared variables) and connect to the database only when necessary, or should I maintain the database connection throughout the life of the form? Is there any significant advantage of one of the methods over the other?
I'm a newbie, and any thoughts on this will be appreciated.
Thanks!
I'm using OleDb to connect to an Access Database. I have several controls on my form, and most of the controls are populated based on the values chosen by the user in the previous controls.
Now, is it a good idea to store the connection information as global variables (shared variables) and connect to the database only when necessary, or should I maintain the database connection throughout the life of the form? Is there any significant advantage of one of the methods over the other?
I'm a newbie, and any thoughts on this will be appreciated.
Thanks!
Last edited: