PHP 4.0 Bug #9869 Updated: ODBC - odbc_exec does not seem to work with an Access db
| From: | kalowsky@php.net | Date: | Mon, 26 Mar 2001 22:05:26 +0000 |
| Subject: | PHP 4.0 Bug #9869 Updated: ODBC - odbc_exec does not seem to work with an Access db | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49999@lists.php.net to get a copy of this message | ||
ID: 9869
Updated by: kalowsky
Reported By: bruceg@garlockprinting.com
Old-Status: Open
Status: Assigned
Bug Type: ODBC related
Assigned To:
Comments:
working on something similar already for some of the other bug reports... guess i can tack this onto
the pile as well..
Previous Comments:
---------------------------------------------------------------------------
[2001-03-20 08:51:49] bruceg@garlockprinting.com
I am unable to use PHP/Openlink ODBC to get specific rows based on my SELECT statement form a MS
Access 97 db. I can use PHP/Openlink just fine while accessing an Informix db hosted on a SCO box.
I can also use Perl/DBI:DBD:ODBC to get the rows I need from this Access db, so I'm guessing
this is a PHP bug. Here is a snipet of the code I use:
putenv( "ODBCINI=/usr/local/openlink/bin/odbc.ini" );
putenv( "ODBCHOME=/usr/local/openlink" );
putenv( "ODBCINST=/usr/local/openlink/bin/odbcinst.ini");
$conn = odbc_connect("DSN=ink","","", SQL_CUR_USE_ODBC);
$sql = "SELECT DISTINCT * FROM ComponentUse WHERE Code = 'CX145' ";
$cur = odbc_exec($conn, $sql);
// This section of code displayes the tables in the db fine.
$tablelist = odbc_tables($conn);
while (odbc_fetch_row($tablelist)) {
echo odbc_result_all($tablelist);
}
// This section of code does not work - dies with "Driver not capable"
while (odbc_fetch_row($cur)){
$code = odbc_result($cur, "code");
printf ("Code: $coden");
}
odbc_close($conn);
The code will display the table list just fine, but I get the following error from the odbc_exec
statement:
Warning: SQL error: [OpenLink][ODBC][Driver]Driver not capable, SQL state S1C00 in SQLExecDirect in
/home/httpd/html/ink/dispenser/comp_use.php on line 23
Like I said, I can use Perl/DBD just fine to get the rows I want with that select statement, so this
must be a PHP bug?
Thanks for any help. I really would like to write this application in PHP, since I'm not too
proficient in Perl.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9869&edit=2