Function AutoGen Para forwhom If Used("Generator") Use In generator Endif Use generator In 0 Alias generator Select generator Set Order To Module Seek Allt(forwhom) if found() Repl generator.counter With generator.counter+1 RetValue=generator.counter if used('Generator') Use In generator endif RetValue=Padl(Allt(Str(temp)),10,'0') Return RetValue else *Error Statement endifIssuing an update will be like
ConnectHandle=SqlConnect("MSSQLDSNNAME","UN","PWD") SQLSETPROP(ConnectHandle, 'Transactions', 2) SQLSETPROP(ConnectHandle,"DispWarnings",.T.) *Assuming they are numeric in nature Sqlexec(ConnectHandle,"Update mySQLTable set lockkeycolumn = "+altrim(str(keycolumn))+" where custno = "+alltrim(str(mycustno))) Sqlrollback(ConnectHandle)/SqlCommit(ConnectHandle) Sqldisconnect(ConnectHandle)>Hi Everyone,
begin transaction >update mySQLTable >set lockkeycolumn = keycolumn >where custno = mycustno >..... >*-- do rollback or commit>