Thanks. You made me think about my situation a little more clear. =
Rather than trying the insert and then detecting the error I just use a =
select to determine if an ID exists in the DB -- much be
[quoted text, click to view] "Greg Linwood" <g_linwoodQhotmail.com> wrote in message =
news:ud#pS9WZEHA.3144@TK2MSFTNGP12.phx.gbl...
Hi Jay
Unfortunately, there isn't any way to do that using the technology as =
is. Sorry for the bad news!
Generally speaking, this is something you have to take into =
consideration when designing your application. As a result of this =
limitation, it's common to implment complex error handling logic in =
application data tier layer.
Regards,
Greg Linwood
SQL Server MVP
[quoted text, click to view] "Jay" <me@somewhere.com> wrote in message =
news:eoYZJDWZEHA.1480@TK2MSFTNGP10.phx.gbl...
I have a stored procedure where I try to insert into a table. Some =
times the insert will fail because of a primary key constraint. I want =
to ignore that message. I want my VB.NET program to not even be aware =
of the error. Even though I handle the error in the SP using @@error I =
cannot stop SQL Server from notifying my program that an error occured. =
Is there anyway to turn off error notification for this few lines of =
code?
Thanks