October 7, 2003 at 10:49 am
hello,
please help ,
i have a visual basic application that that execute SP in SQL server, the SP update a table that have a check constraint in one of its field. When i execute the appliation nothing is updated. i try to exec sp throug QA and i get the following error "check constraint violation occurred"
my question is how can i know if error is happend in the SQL server throuhg visual basic.
Thanks
October 8, 2003 at 2:12 am
I am assuming that you are using ADO and have error handling in the application but are not getting any errors from executing the SP!
If this is the case then you will probably need to modify the SP to check the state of @@Error, any non zero value means something went wrong and you can return the error code back to your app using an output parameter (or you could use RETURN @@Error at the end of the SP)
Check the state of the return code from your app and handle as required.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply