M T

M T

  • NA
  • 1
  • 0

Share a SQL DB connection in the same form

Apr 11 2008 12:27 PM

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

 

 

 


Answers (2)