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 BejaouiRank #144 · 15.9K pointsPosted Apr 12, 2008, 8:20 AM EDT
{
/* put your code here, and after excution of the bloc the connection will be garbage collected */ authomatically
}
Bechir BejaouiRank #144 · 15.9K pointsPosted Apr 12, 2008, 8:22 AM EDT