G
Guest
HI there,
I am using a Try catch statement and I can return the Exception.Message
fine..but i want to catch a particular SQL error 1205 (locking). How do I say
:
catch (System.Exception ex)
{
//the below line is my interpretation of what I want to say!!
if (ex.SQLERRORCODE == 1205) {
do something else aswell as display label
}
lblError.Text="SQL Error [" + ex.Message + "]";
}
Or is it that .NET can't trap the code itself and I have to obtain this
through a return parameter of the SP??
Thanks,
I am using a Try catch statement and I can return the Exception.Message
fine..but i want to catch a particular SQL error 1205 (locking). How do I say
:
catch (System.Exception ex)
{
//the below line is my interpretation of what I want to say!!
if (ex.SQLERRORCODE == 1205) {
do something else aswell as display label
}
lblError.Text="SQL Error [" + ex.Message + "]";
}
Or is it that .NET can't trap the code itself and I have to obtain this
through a return parameter of the SP??
Thanks,