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:
00985275
Views:
32
Einar,
Oops. My mistake. The error was actually being thrown outside the try/catch routine because I was trying to change the connection string while the connection was still open (1st line of code below).

oSQLConn.ConnectionString = cConnectionString;
try
{
oSQLConn.Open();
return oSQLConn.State.ToString();
}
catch
{
return "Failed";
}

Thanks for your help!

BTW: In this thread you mentioned "Throwing the error back on the stack". Would this cause the error to be caught by the next applicable Catch routine?

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