Vmrincon
2007-04-18 11:02:27 UTC
Hi everybody!
I have a problem related to a connection to a AS400 from a PHP
program.
I am migrating a system that was built in Visual Basic and used to
call a CL this way:
ADOCmd.CommandText = "{{call /QSYS.LIB/EXAMPLE.LIB/
EXAMPLECL.PGM(?,?)}}"
And via ADO worked perfectly...
But now (and this is my real problem) when I try to do the same via
PHP
$dbh = odbc_connect("Driver={Client Access ODBC Driver (32-
bit)};System=ipaddress",'user','pwd');
$sql = 'CALL /QSYS.LIB/EXAMPLE.LIB/EXAMPLECL.PGM(?,?)';
$stmt = odbc_prepare($dbh, $sql);
I get this error:
Warning: odbc_prepare() [function.odbc-prepare]: SQL error: [IBM]
[Drivrutinen iSeries Access ODBC][DB2 UDB]SQL0104 - Token / was not
valid. Valid tokens: : <IDENTIFIER>, SQL state 37000 in SQLPrepare in
and the connection fails. I think it must be something about syntaxis
when using "/". Does anybody have any idea about how could I solve
this? Or does anyone know some good reference to use CL programs from
PHP
Thanks a lot!!!
I have a problem related to a connection to a AS400 from a PHP
program.
I am migrating a system that was built in Visual Basic and used to
call a CL this way:
ADOCmd.CommandText = "{{call /QSYS.LIB/EXAMPLE.LIB/
EXAMPLECL.PGM(?,?)}}"
And via ADO worked perfectly...
But now (and this is my real problem) when I try to do the same via
PHP
$dbh = odbc_connect("Driver={Client Access ODBC Driver (32-
bit)};System=ipaddress",'user','pwd');
$sql = 'CALL /QSYS.LIB/EXAMPLE.LIB/EXAMPLECL.PGM(?,?)';
$stmt = odbc_prepare($dbh, $sql);
I get this error:
Warning: odbc_prepare() [function.odbc-prepare]: SQL error: [IBM]
[Drivrutinen iSeries Access ODBC][DB2 UDB]SQL0104 - Token / was not
valid. Valid tokens: : <IDENTIFIER>, SQL state 37000 in SQLPrepare in
and the connection fails. I think it must be something about syntaxis
when using "/". Does anybody have any idea about how could I solve
this? Or does anyone know some good reference to use CL programs from
PHP
Thanks a lot!!!