Tom, try using an indirect check rather than IF SQLCODE <> 0, and running a single select into statement

SET ERROR VAR vErrVar
SET VAR vErrSave INTEGER
SET VAR vEmpID TEXT = NULL
DIALOG 'Enter Employee ID' vempid=20 vEndKey 1 CAPTION 'Employee ID' ICON QUESTION select emplname into vemplname indic ivemplname, vempfname indic ivempfname +
from employeetab where empid = .vempid
SET VAR vErrSave = .vErrVar
IF vErrSave <> 0 THEN
...

Albert

TOM HART wrote:
On the newest build of compiled app(of which I have changed nothing, just recompiled my rmd file), something seems to have happened to the scratch settings. I have scratch set to tmp in the startup file. Here is one example:

set var vempid text = null
select empfname into vempfname indic ivempfname from employeetab where empid = .vempid
if sqlcode <> 0 then
pause 2 using 'Employee ID is incorrect'
goto done
endif
edit using AAEmpClockOut where empid = .vempid and empdate = .#date
IF SQLCODE <> 0 THEN
enter using AAEmpClockIn
set var vclockin text = (.vempfname&.vemplname&'has clocked-in')
PAUSE 2 USING .vclockin ICON CONFIRM BUTTON 'OK' OPTION BACK_COLOR+
green|MESSAGE_FONT_NAME Arial|MESSAGE_FONT_COLOR 0|MESSAGE_FONT_SIZE 16|MESSAGE_FONT_BOLD ON
else
set var vclockout text = (.vempfname&.vemplname&'has clocked-out')
PAUSE 2 USING .vclockout ICON CONFIRM BUTTON 'OK' OPTION BACK_COLOR+
red|MESSAGE_FONT_NAME Arial|MESSAGE_FONT_COLOR 0|MESSAGE_FONT_SIZE 16|MESSAGE_FONT_BOLD ON
endif
label done
return

prior builds I had no problem, now when I enter the Employee it goes straight to the 'pause 2 using .vclockout......'
As stated previously, I changed nothing just recompiled with newest build

Tom Hart


--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to