CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

Check if the connection is still open... topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2010, 12:57 AM
Junior Member
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Krstevski is on a distinguished road
| More
Check if the connection is still open...

Hello friends, I have a small problem, I need to check if the database connection is still open. Here is my code...

try {
// new connection
// connection open
// other code
// close the connection
} catch (Exception ex) {
// handling exception
} finally {
// Here I want to close the connection if still open
}
So... how to check id the connection is still open ?
p.s. I use C#.NET 2.0, MS Access database (OleDbConnection).

Thanks.
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
bat script check ping output k2k Shell Scripting 0 08-31-2010 04:07 PM
Open each file in a directory and check corrupted files Member12 MFC Programming 0 07-08-2010 07:42 AM
how to check internet connection Hystrio MFC Programming 1 07-24-2008 11:58 PM
MFC SDI with ODBC Connection gaurav0381 MFC Programming 8 02-26-2008 05:45 AM
tristate check box sunil MFC Programming 1 02-26-2008 02:29 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 02:44 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board