Looks like your using the ADODB instead of ADO.NET for starters. Then you should use a Try Catch to trap the error being generated from the data access code.