Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ticatac
Starting Member
6 Posts |
Posted - 2003-11-20 : 04:51:47
|
I'm executing a SP from VB and I want to trap any errors that are coming back to the client, I beleive I have the code to accomplish this but when an error does occur e.g. violation of unique key, the SQL server message is displayed before my code has a had a chance to handle the error. Is there any way that these messages can be suppressed or turned off so that my code can handle the errors?Thanks in advance.ticatac |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-11-20 : 04:57:14
|
We can't really tell until we see some code here. Does this give you any ideas?On Error Resume Next myConnection.Execute (commandText) For each e in myConnection.Errors Msgbox e.Description Next Owais Where there's a will, I want to be in it. |
 |
|
|
ticatac
Starting Member
6 Posts |
Posted - 2003-11-20 : 05:32:32
|
| doh!!!That's exactly what i was missingThanks |
 |
|
|
|
|
|