dbTalk Databases Forums  

sqlconnection open state

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss sqlconnection open state in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike J
 
Posts: n/a

Default sqlconnection open state - 04-13-2007 , 04:45 PM






how to check the connection state sql

if (oconn.State.tostring()="Closed")

or is there a more approiate way
thanks
MJ



Reply With Quote
  #2  
Old   
Dan Guzman
 
Posts: n/a

Default Re: sqlconnection open state - 04-15-2007 , 07:28 AM






Quote:
or is there a more approiate way
How about:

if (oconn.State == ConnectionState.Closed)




--
Hope this helps.

Dan Guzman
SQL Server MVP

"Mike J" <vettes_n_jets (AT) sbcglobal (DOT) net> wrote

Quote:
how to check the connection state sql

if (oconn.State.tostring()="Closed")

or is there a more approiate way
thanks
MJ




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.