de la ayuda de fwh
http://wiki.fivetechsoft.com/doku.php?id=fivewin_class_fwmariaconnectionCode: Select all | Expand
Execute
SqlQuery (cSqlStatement, [aParams], [lShowError := .f.]) –> uResult
uResult can be
a) nil if there is no result or if error occured.
In case of error, oCn:nError and oCn:cError provide teh error information
Optionally setting lShowError displays ther error or result of sql statement,
b) Numeric: In case of insert, update, etc indicating the affected rows
c) If the result is a result-set, it is returned as Multi-Dim array
lo mejor que puedes hacer es parametizarlo, ya que de esta forma "cDato" es tratado para evitar las sqlinjection.
Code: Select all | Expand
LOCAL oDatos := ::oCnx:Execute( "SELECT id, nombre FROM tbdistribuidores WHERE tbdistribuidores.nombre =?",{ cDato } )