Stored Procedure and @@ERROR

C

Chris Woodcock

Hi,

I have written an update stored procedure which is called by an update
command in an SqlDataAdapter, when running the stored proc it is possible to
invalidate a foriegn key constraint. If I test the stored proc from query
analyser the @@ERROR contains 547 after the update when the contraint is
invalidated, which is correct, however if I call the stored proc from an
update on the SqlDataAdapter then the @@ERROR value is 0 after the contraint
violation which is no error and no rows are updated (because the contraint
really was invalidated) and this is mistaken for an optimistic lock
violation.

Anyone have clue?

Thanks,

Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top