- Code: Select all Expand view RUN
- cWhere := oBD:ApplyParams("WHERE esc.cemp = ? ", { "018"})
oRS := oBD:Query( "SELECT * FROM esocial AS esc ? ORDER BY data,hora", { cWhere } )
oRs:status := 3
oRs:Save()
When I perform oRS:Save() is generating the log bellow that I do not understand.
28/03/2018 13:54:00: FWMARIACONNECTION:EXECUTE_SQL( 5369 ) CallStack() = " <- FWMARIACONNECTION:EXECUTE(5609) <- FWMARIAROWSET:RESYNC(3380) <- FWMARIAROWSET:EDITBASERECORD(4186) <- (b)SFP213(72) <- TBUTTONBMP:CLICK(179)" cSql = "SELECT * FROM esocial AS esc WHERE `esc`.`CEMP` = '018' AND `esc`.`DATA` = '2018-03-28' AND `esc`.`HORA` = '10:46WHERE esc.cemp = '018' 3' AND `esc`.`TIPO` = 'S1030' AND `esc`.`CAMPO` = '10200513' AND ( esc.cemp = '018' ) ORDER BY data,hora" uRet = ::nError = 1064 ::cError = "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '018' 3' AND `esc`.`TIPO` = 'S1030' AND `esc`.`CAMPO` = '10200513' AND ( esc.cem' at line 1" ::cSqlInfo = ""
I Observed there are two clausules WHERE in sql expression ! Could you help me ?