Link to home
Start Free TrialLog in
Avatar of brgdotnet
brgdotnetFlag for United States of America

asked on

In my VB .Net winforms application, how can I maintain a connection to my database?

I have a VB .NET Windows form application(Not a web application). When I press a button on the form, it will connect to the database and load data into a GridView control. That works great, but several other forms also need a database connection. So here is my question. Is there a way to make my database connection more persistent so that it can be accessed anywhere in the application? If so, how would I do it?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brgdotnet

ASKER

Thank you Fernando? Is this like a static class where I just reference the values via the class name?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial