Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Closing Connections

Reply
Thread Tools

Closing Connections

 
 
James
Guest
Posts: n/a
 
      01-04-2005
What's the proper syntax for determining if a connection is open before
closing it? Oddly enough, I can't find it on a google search.


 
Reply With Quote
 
 
 
 
Stuart Palmer
Guest
Posts: n/a
 
      01-04-2005
If you are doing things right you should never try and close a connection
before it's opened.

Ideally, I believe the best solution would be to open connection, throw
output values into variables and then immediatly close the connection.

Stu

"James" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What's the proper syntax for determining if a connection is open before
> closing it? Oddly enough, I can't find it on a google search.
>
>



 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-04-2005
James wrote:
> What's the proper syntax for determining if a connection is open
> before closing it? Oddly enough, I can't find it on a google search.


Use its State property:
http://msdn.microsoft.com/library/en...mdprostate.asp

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing popup window when closing parent window? =?Utf-8?B?Vk1J?= ASP .Net 3 02-15-2007 08:29 AM
Closing the doors 15 minutes before closing. doofus Computer Support 12 06-11-2005 08:20 AM
Re: Opening / Closing SQL Server connections Patrice ASP .Net 3 09-21-2004 11:58 PM
Closing out database connections. Timeouts Do ASP .Net 2 12-09-2003 10:06 AM
Closing child window WITHOUT closing parent thomas Javascript 0 10-23-2003 04:10 PM



Advertisments