Trapping SQLException on a DataBound control
am 21.01.2008 15:22:24 von Larry Bud
I can trap general errors on a datasouce. For example, on an Inserted
event:
If e.Exception IsNot Nothing Then
e.ExceptionHandled = True
'do stuff here
End If
But how do I trap specific SQL errors on a databound control?
RE: Trapping SQLException on a DataBound control
am 23.01.2008 02:38:22 von Manish
Hi Larry,
I think, you can catch the exception or handle the exception in the
respective events for the GridView databound control like if you want to
catch the exception while updating then you can catch it on Gridview_updated
event.
Regards,
Manish
www.ComponentOne.com
"Larry Bud" wrote:
> I can trap general errors on a datasouce. For example, on an Inserted
> event:
>
> If e.Exception IsNot Nothing Then
> e.ExceptionHandled = True
> 'do stuff here
> End If
>
>
> But how do I trap specific SQL errors on a databound control?
>