Marc,

 

My way of dealing with this kind of queries is to make use of a COUNT, like:

 

Set var V_Count integer = 0

Select count(*) into V_Count indicator V_Count_ind +
from <tableview> +

WHERE (cust1 = .vcust1 OR cust2 = .vcust1 OR cust3 = .vcust1 +
OR cust4 = .vcust1) AND aptdate > .#DATE

If V_Count = 0 then

PAUSE 1 USING 'Needs to make an Apt' CAPTION 'No APts set'
ENDIF

 

BTW   Have you noticed the RETURN after ENDIF.

The routine will stop at that point

 

Tony

From: [email protected] [mailto:[email protected]] On Behalf Of MDRD
Sent: woensdag 4 januari 2012 20:12
To: RBASE-L Mailing List
Subject: [RBASE-L] - Win 7 problem

 

HI

 

I just moved my 7.6 app to a new Win 7 computer and now some blocks of code
run differently. I am using Ver 7.6.11.31014, it is different then my old
computer, I updated versions to get a new license to install this on the new
computer.

This block of code use to work in Vista, if the Browse command failed the
SQLCODE would be 100 and the Pause command would work. Now using Win7, no
changes in the code the SQLCODE = 0 and I go to the bottom block of code,
then it skips the IF SQLCODE = 100.

I have no earthly clue what to look for, 

Thanks

Marc


BROWSE USING aptnext +
WHERE (cust1 = .vcust1 OR cust2 = .vcust1 OR cust3 = .vcust1 +
OR cust4 = .vcust1) AND aptdate > .#DATE

IF SQLCODE = 100 THEN
PAUSE 1 USING 'Needs to make an Apt' CAPTION 'No APts set'
ENDIF
RETURN

SET VAR #NOW DATETIME = NULL
SET VAR Vcap1 TEXT = NULL
SET VAR RBTI_FORM_FORMNAME TEXT = NULL
return

 

 

Reply via email to