I have a stored procedure (SQL Server 2000) that has the following
CREATE PROCEDURE ins
INSERT INTO TABLE A VALUES (...)
IF error = 2627
Now when I insert duplicate recs, I should just get the message OOPS.
This does not seem to happen, though.
When I execute the procedure in Query yzer, I keep getting
the entire SQL Server message saying that a unique constraint violation
occured followed by the word OOPS. WHy is this happening? SHould'nt
my result just be OOPS and not the entire error string considering I'm
trapping the error.