lcComma="" c="" for each oPair in oValues c=c+ lcComma+ opair.name+"="+opair.value && note that here we need some conversion to string lcComma=", " endfor text to lcSql noshow textmerge update <<lcTable>> set <<c>> where pkField=?nPkValue endtext nRet=sqlexec(h, lcsql)where oValues is a collection of objects containing name/value pairs (but you may have them in an array or other storage, so the loop would look differently). The loop could also skip those missing values as well.
oE=createobject("empty") lcComma="" c="" for each oPair in oValues addproperty(oE, oPair.name, oPair.value) c=c+ lcComma+ opair.name+"=?oE."+opair.name lcComma=", " endfor text to lcSql noshow textmerge update <<lcTable>> set <<c>> where pkField=?nPkValue endtext nRet=sqlexec(h, lcsql)Now if you so strongly prefer stored procedures, enjoy them...