How to catch scalar error?

  • Thread starter Thread starter martin
  • Start date Start date
M

martin

When I execute Scalar and it finds no data,it
cannot be trapped. Function with scalar returns nothing
instead of value in catch statement.
 
You need to check if the ExecuteScalar returns null. I dont think it with
throw an exception if its just as simple as a query not returning a value.

Hope this helps
Kieran
 
It does not return null.
Kieran Benton said:
You need to check if the ExecuteScalar returns null. I dont think it with
throw an exception if its just as simple as a query not returning a value.

Hope this helps
Kieran
 
Back
Top