I am calling the following sp using ADO from VB:
Code:
BEGIN
INSERT INTO IMPListAssocRecipientTbl values(@ListID,@ReceipientID,@ReceipientLastName,@ListName)
IF (@@error <> 0) OR (@@rowcount <> 1)
BEGIN
RETURN 999
END
END [\code]
If the error/rowcount condition is not met I get a return value of 0 in my ADORetrnVal-parmarter, Great, no probs.
However if the condition is met (typically with a Cannot Insert Dupe Key error) a msg is sent to client, but no value is being returned to the ADOparameter. Yet when I step through the code I see the cursor step into the RETURN Line.
Does anybody know where my 999 might be?
Yael