Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Message not appearing on client when using RAISERROR 1

Status
Not open for further replies.

hopgal

Programmer
Mar 11, 2000
25
US
I am adding some triggers which fire and raise errors, and the triggers are functioning properly, except for the RAISERROR. The errors are being logged into the Application Event Log. However, the error messages are not appearing on the client's screen. Here is one of my triggers:

CREATE TRIGGER version_manager_id_required
ON trkscrsl
FOR INSERT,UPDATE
AS
IF update(x17)
BEGIN
IF (SELECT x17 FROM INSERTED)=61 BEGIN
RAISERROR (60002,16,1)
ROLLBACK TRANSACTION
RETURN
END
END
GO Remove "nospam" from my email address to reply.
 
No, it's PVCS Tracker, a defect tracking tool. I am trying to set it up with some extra triggers to enforce our SQA rules. The vendor says there is no way to pass the error messages back through their app. I am now trying to find some alternate way to display the error messages. I can't believe that no one has ever faced this problem before. Remove "nospam" from my email address to reply.
 
Well... if you are looking for the PVCS tracker to respond to the RAISERROR, then THAT application would have to have been coded to respond to the error.

The RAISERROR will send info back to a client, but the client will only display or deal with the error only if it has been coded to deal with it...

Is this the case... Are you assuming that this off-the shelf application should be doing this?

Tom
 
I thought that the app would have been programmed to display SQL errors of any kind. But obviously it isn't. I guess I am going to have to write some C++ or VB code to pop up a message box. Remove "nospam" from my email address to reply.
 
Have you tried:
remove the RETURN
rolling back before the raiserror
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top