By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

How to catch scalar error?

P: n/a
When I execute Scalar and it finds no data,it
cannot be trapped. Function with scalar returns nothing
instead of value in catch statement.
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"martin" <ma************@zd.htnet.hr> wrote in message
news:bi**********@ls219.htnet.hr...
When I execute Scalar and it finds no data,it
cannot be trapped. Function with scalar returns nothing
instead of value in catch statement.

Nov 15 '05 #2

P: n/a
It does not return null.
"Kieran Benton" <ki**********@hotmail.com> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
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

"martin" <ma************@zd.htnet.hr> wrote in message
news:bi**********@ls219.htnet.hr...
When I execute Scalar and it finds no data,it
cannot be trapped. Function with scalar returns nothing
instead of value in catch statement.


Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.