//$sql="select sum(NSALESAMT) from CUSTINVOICE where DINVOICE between '2008-01-01' and '2008-01-31'"; $sql="SELECT * FROM custinvoice WHERE dinvoice = '2008-04-03'"; //$sql="SELECT * FROM custinvoice // Este si funca $consulta=odbc_exec($cid,$sql)or die(exit("Error en odbc_exec")); print odbc_result_all($consulta, "border=1"); exit; ERROR: Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Visual FoxPro Driver]Operator/operand type mismatch., SQL state 22005 in SQLExecDirect in C:\wamp\www\Plaza1\mensual-test.php on line 25 Error en odbc_exec