Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try/Catch Routine Not Working
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00985235
Message ID:
00985247
Vues:
34
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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform