Re: SP fails, but OleDbCommand does not throw error! by Robert
Robert
Tue Sep 07 10:28:45 CDT 2004
We need more information than that in order to provide assistance. Mainly,
what database are you using, and what ODBC provider? I doubt it's a problem
with ADO.NET, only because that's something important enough to have been
caught and fixed by now, I'm sure. Also note that it's up to the ODBC
provider to send notification of an error. Make sure you're using the latest
version.
I don't normally use ODBC Providers, so this may be by design and someone
may have a better answer for you, however it would be very helpful if you
could provide more information regarding your specific problem. What
database are you using? What is the code you are using to execute your
command? What version ODBC provider?
--ROBERT
"John Mark Howell" <jmarkhowell@hotmail.com> wrote in message
news:uZ%23EMpOlEHA.2892@tk2msftngp13.phx.gbl...
> BlankI have found a major problem with the OleDb portion of ADO.NET. If
you
> are using it to call a stored procedure and the procedure has an internal
> error of some type, the sp will fail, but the OleDbCommand object will not
> throw any type of error.
> For example, I have a proc that does an insert and I pass in a value for
one
> of the parameters that will cause a foreign key violation. The call the
> proc will complete but nothing will be inserted. I can create that same
> insert statement and call it with an OleDbCommand object and will get the
> error.
> Other than a return value, does anyone know how to get a call to an SP to
> throw an error when it fails??????
>
> --
> John Mark Howell
>
>