Not sure I follow the logic that code failure = change in scratch settings but
try this code..
SET VAR vempid TEXT = NULL
DIALOG 'Enter Employee ID' vempid=20 vEndKey 1 CAPTION 'Employee ID' ICON
QUESTION
SET VAR vEmpCnt INTEGER='0'
SELECT COUNT(*) INTO vEmpCnt FROM employeetab WHERE empid = .vempid
IF vEmpCnt>'0' THEN
SELECT emplname INTO vemplname INDICATOR ivemplname,empfname INTO
vempfname INDICATOR ivempfname +
FROM employeetab WHERE empid = .vempid
SET VAR vEmpClockOutCnt INTEGER='0'
SELECT COUNT(*) INTO vEmpClockOutCnt FROM AAEmpClockOutTable WHERE empid =
.vempid AND empdate = .#DATE
IF vEmpClockOutCnt='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
ELSE
PAUSE 2 USING 'Employee ID is incorrect'
ENDIF
RETURN
----- Original Message -----
From: TOM HART
To: RBASE-L Mailing List
Sent: Wednesday, May 12, 2010 8:21 AM
Subject: [RBASE-L] - Scratch
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
DIALOG 'Enter Employee ID' vempid=20 vEndKey 1 CAPTION 'Employee ID' ICON
QUESTION
select emplname into vemplname indic ivemplname from employeetab where empid
= .vempid
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