Alastair: My response to Dennis was meant to show simply how to prevent some specific error messages from "displaying" to the screen. It was not meant to be a complete description on how to trap for errors, as it appeared (by the presence of an error variable) that he was already doing that. Javier,
Javier Valencia, PE President Valencia Technology Group, L.L.C. 14315 S. Twilight Ln, Suite #14 Olathe, Kansas 66062-4578 Office (913)829-0888 Fax (913)649-2904 Cell (913)915-3137 ================================================ Attention: The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all system and destroy all copies. ====================================================== -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Alastair Burr Sent: Monday, June 06, 2005 1:03 PM To: RBG7-L Mailing List Subject: [RBG7-L] - RE: Unable to suppress error messages? But, Mike, maybe I'm not seeing it but Javier's suggestion - sorry, Javier, this isn't meant to be a criticism - excluded the error variable line. That's what I was trying to get at: SET ERROR MESSAGE 2378 OFF INSERT INTO vref pr_nbr vn_id vn_unitp vn_ltrns VALUES + .prnbr, .vnid, .unitp, .trdate SET ERROR MESSAGE 2378 ON The insert may or may not work but the error variable doesn't get set immediately after the insert command - whether or not the error message is on or off. Anyhow, Dennis's problem was the message appearing even though it's been turned off first. Regards, Alastair. ----- Original Message ----- From: "MikeB" <[EMAIL PROTECTED]> To: "RBG7-L Mailing List" <[email protected]> Sent: Monday, June 06, 2005 5:36 PM Subject: [RBG7-L] - RE: Unable to suppress error messages? > > > > If SET ERROR MESS #### ON is run won't the error variable be for that > > command? > > Yes. That is the reason for the intermediate variable vHoldErr, to catch the > value of vERR before any Other command causes the error value to be set to that > actions result. > > > > Regards, > > Alastair. > > >> Even with: > >> > >> Set mess XXXX Off > >> > >> The error variable still holds the value of the err mess Like > >> > >> > >> Set error var verr > >> set var vHoldErr int = null > >> > >> Select somecol from someTable wher someCol = 'SomeValueNotThere' > >> set var vHoldErr = .verr > >> > >> > >> The value of vHoldErr is 2059, so you can still check for error even with > > the > >> message suppressed from the GUI. > >> >
