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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Turn off the information message

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-06 : 09:07:13
Jim writes "Hi,

I create a unique index with IGNORE_DUP_KEY. I create a procedure to insert data in the table with IGNORE_DUP_KEY. My program is stopped because there is a message:
Server: Msg 3604, Level 16, State 1, Line 1
Duplicate key was ignored.
Is there a way that I can turn off the message in my procedure?
(this is not a error, it is the way to let us know that dup records are removed).
I appreciate your help.

Jim"

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-05-06 : 16:02:05
No.
Why does your program stop on this message.
Its an informational message that does not change @@error


Go to Top of Page

VyasKN
SQL Server MVP & SQLTeam MVY

313 Posts

Posted - 2002-05-06 : 16:09:40
quote:

No.
Why does your program stop on this message.
Its an informational message that does not change @@error






It looks like Jim is querying the ADO Connection object's Errors collection. Thuogh this is an informational message, it gets recorded as an error message in that collection. To avoid this, one might want to check the VBScript's Err object.

--
HTH,
Vyas
http://vyaskn.tripod.com
Go to Top of Page
   

- Advertisement -