revQueryDatabase

Robert Mann robmann at gp-racing.com
Mon Dec 11 20:45:59 EST 2006


I am having a problem with revQueryDatabase returning a number when it
should not be I think?
In the following sql statement if there is no wt_springcalc.year_model='" &
gyearmodel & "' curID should not be a number?


put "SELECT * FROM wt_springcalc WHERE wt_springcalc.year_model='" &
gyearmodel & "' and wt_springcalc.company_id='1'" into theSQL
put revQueryDatabase(dbID2, theSQL) into curID
put curID into fld "curIDnum"

IF curID is a number THEN
put revDatabaseColumnNamed(curID,"fr_mx_multiplier") into fld "frmxm1"

ELSE
put curID into fld "error"
exit mouseUp

END IF


What happens is curID is returned as a number then when the
revDatabaseColumnNamed(curID,"fr_mx_multiplier") into fld "frmxm1" executes
it puts ”revdberr,invalid column number” in the fld and then rev shuts down

Not sure where I have gone wrong?


Thanks
Robert Mann






More information about the Use-livecode mailing list