I use a common connection cnn;
If the conn is opened, if I open it again, it will through a exception
How can I determinate a SqlConnection is open or not before I open it?
conn.State
Highly .State and click F1 in Visual Studio.NET
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
Earn $$$ money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:%23vHfoN8gFHA.576@.TK2MSFTNGP15.phx.gbl...
>I use a common connection cnn;
> If the conn is opened, if I open it again, it will through a exception
> How can I determinate a SqlConnection is open or not before I open it?
>
>
Wednesday, March 21, 2012
How to determinate a SqlConnection is open or not
Labels:
cnnif,
common,
conn,
connection,
database,
determinate,
exceptionhow,
microsoft,
mysql,
oracle,
server,
sql,
sqlconnection
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment