Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/07/2010, 14:00
Avatar de jeic86
jeic86
 
Fecha de Ingreso: julio-2010
Ubicación: Bogota
Mensajes: 3
Antigüedad: 13 años, 9 meses
Puntos: 0
Respuesta: Problema al ejecutar sp con php conectado via ODBC

Hola santris gracias por tu colaboración,
la variable la paso por url, el warning y la forma como recibo la variable los describo a continuacion.
<?php
$_GET['parametro'];
$sql = 'SP_MIPROCEDIMIENTO $parametro';
$rs = odbc_exec($conex,$sql);
while(odbc_fetch_row($rs)){
$Documento = odbc_result($rs, 1);
$Estado = odbc_result($rs, 2);
$Deuda = odbc_result($rs, 3);

print("Documento: $Documento<br>Estado: $Estado<br>Deuda: $Deuda<br>");

}
?>
El warning que se genera es el siguiente:

Warning: odbc_exec() [function.odbc-exec]: SQL error: [INTERSOLV][ODBC SQL Server driver][SQL Server]Implicit conversion from datatype 'VARCHAR' to 'NUMERIC' is not allowed. Use the CONVERT function to run this query. , SQL state 22005 in SQLExecDirect in C:\AppServ\www\consorcioprueba.php on line 41

Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in C:\AppServ\www\consorcioprueba.php on line 43