Hi
I have been working in VB.NEt and recently shifted to C#. I want to open a DB connection and keep it open till user close the form. I want to use this connection for fetching different record sets.
In VB, I can declare a CONN variable in teh beginig of the form and open the connection at the form load and keep on using it.
Is there a way in C#?
Thanks
Bechir BejaouiPosted Apr 12, 2008, 12:22 PM
Bechir BejaouiPosted Apr 12, 2008, 12:20 PM
{
/* put your code here, and after excution of the bloc the connection will be garbage collected */ authomatically
}