Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Try/Catch Routine Not Working
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00985235
Message ID:
00985247
Views:
33
Einar,

Thanks for replying on this!

>My guess is that the error is "handeled" in the Open() method, i.e. there is a try catch in the Open() method that displays an error dialog and does not rethrow the error back up the call stack

That sounds logical although not sure what to do about it.


>Could you please post the code used to declare and initialize the oSWLConn object?


SqlConnection oSQLConn = new SqlConnection();
public string OpenSqlConnection(string cConnectionString)
{
oSQLConn.ConnectionString = cConnectionString;
try
{
oSQLConn.Open();
return oSQLConn.State.ToString();
}
catch
{
return "Failed";
}
}


Thanks, Todd
The day you take complete responsibly for yourself, the day you stop making any excuses, thats the day you start to the top. - O.J. Simpson

Great advice from a questionable source...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform