update sql not working
Robert Mann
robmann at gp-racing.com
Fri May 11 13:46:31 CDT 2007
The following works fine with mysql database but the first 'update' is not
with the valentina database, the tables in both databases are identical
get "fcomp = " &'& fld fcomp &'
get it & ",datemodified = "&'>odaysdate &'
get it & ",freb = " &'& fld freb &'
get it & ",ficsspring = " &'& fld ficsspring &'
get it & ",fspring = " &'& fld fspring &'
get it & ",fspringfree = " &'& fld fspringfree &'
get it & ",fprel = " &'& fld fprel &'
get it & ",fsag = " &'& fld fsag &'
get it & ",foillevel = " &'& fld foillevel &'
get it & ",fmidlift = " &'& fld fmidlift &'
get it & ",ftubeht = " &'& fld ftubeht &'
put it into updateColValListOf123Pairs
IF dbID is a number THEN
IF fld "record_id" is not empty THEN
put "UPDATE ">ypevalving&" set "&updateColValListOf123Pairs&"
WHERE record_id = '" & fld "record_id" & "'" into tSQL
revExecuteSQL dbID,tSQL
put "SELECT * FROM stockvalving WHERE yrmodsize= '"&
gyearmodel & "'" into theSQL
put revQueryDatabase(dbID, theSQL) into curID
put revDatabaseColumnNamed(curID,"datemodified") into
tdatemodified
IF gtodaysdate = tdatemodified THEN
put "UPDATE yearmodelsize set stock_specs_complete = 'yes'
WHERE year_model = '" & gyearmodel & "'" into tSQL
revExecuteSQL dbID,tSQL
beep
answer warning "update completed" titled "Completed"
ELSE
answer "There was a error in the update process!"
break
END IF
ELSE
beep
answer warning "There is no data to update." titled "Warning"
END IF
ELSE
answer "There was an error in the update process!"
END IF
Thanks
Rob
More information about the Valentina
mailing list