Since I started this thread (and I will check with RBTI if some errors are "unsurpressable") let me try and address your point.
The error variable VDERR is set after every instruction.
If I have:
SET ERROR VAR vderr
...
SET ERROR MESSAGE OFF
INSERT INTO vref pr_nbr vn_id vn_unitp vn_ltrns VALUES +
.prnbr, .vnid, .unitp, .trdate
SET ERROR MESSAGE ON
SET VAR verr = .vderr
The variable verr will show only if the instruction: SET ERROR MESSAGE ON
executed without an error.
If I want to see if the Insert command had an error, then I would switch the commands:
SET ERROR MESSAGE OFF
INSERT INTO vref pr_nbr vn_id vn_unitp vn_ltrns VALUES +
.prnbr, .vnid, .unitp, .trdate
SET VAR verr = .vderr
SET ERROR MESSAGE ON
If I wanted to see if an error with the Insert occurred other than "2378" I could have code like:
IF verr <> "0" THEN
IF verr <> "2378" THEN
... unexpected error processing
ELSE
.... expected err processing
ENDIF
ENDIF
>>>>
Dennis
At 06:13 PM 6/6/2005, you wrote:
It seems obvious either that I cannot read straight or explain myself
clearly today. Whatever I thought I read must have been different to what
everybody else read. Never mind, I'm sorry, I should set my own "error
checking" on and kept my thoughts to myself <g>.
Regards,
Alastair.
----- Original Message -----
From: "Javier Valencia" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Monday, June 06, 2005 7:50 PM
Subject: [RBG7-L] - RE: Unable to suppress error messages?
> 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]]On 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.
> > >>
> >
>
Dennis Fleming
IISCO
Phone: 570 775-7593
Mobile: 570 351-5290
