Bug #13604 Updated: odbc_primarykeys with Access
| From: | josh at engledental dot com | Date: | Thu, 06 Jun 2002 17:01:00 +0000 |
| Subject: | Bug #13604 Updated: odbc_primarykeys with Access | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9653@lists.php.net to get a copy of this message | ||
ID: 13604
Updated by: josh@engledental.com
Reported By: phperror@gustl.at
Status: Open
Bug Type: ODBC related
Operating System: W98, W98SE
PHP Version: 4.0.6
New Comment:
I get the same error when trying to run odbc_specialcolumns. SQL state
00000 is success, so I guess its the ODBC driver which isn't handling
things correctly? Any ideas?
Previous Comments:
------------------------------------------------------------------------
[2001-10-08 16:58:02] phperror@gustl.at
Hi,
i don't get odbc_primarykeys () working with access-dbs. example:
<?php
$dsn = "accessdsn"; $user = ""; $pass = ""; $db =
"accessdb";
# $dsn = "mssqldsn"; $user = ""; $pass = ""; $db =
"mssqldb";
# $dsn = "mysqldsn"; $user = ""; $pass = ""; $db =
"mysqldb";
$con = odbc_connect ($dsn, $user, $pass) or die ("no connect to
$dsn");
$res = odbc_tables ($con, $db, "", "%", "'TABLE'") or die
("no tables
in $db of $dsn");
odbc_result_all ($res);
echo "<h2>Tables in db $db of $dsn</h2>";
$res = odbc_tables ($con, $db, "", "%", "'TABLE'") or die
("no tables
in $db of $dsn");
while (odbc_fetch_row ($res)) {
$qualifiers [] = odbc_result ($res, 1);
$owners [] = odbc_result ($res, 2);
$tables [] = odbc_result ($res, 3);
}
print_r ($tables);
reset ($tables);
while (list ($i, $table) = each ($tables)) {
echo "<h2>keys of ".$table." (".$qualifiers [$i].", ".$owners
[$i].")</h2>";
$res = odbc_primarykeys ($con, $qualifiers [$i], $owners [$i],
$table);
if ($res)
odbc_result_all ($res);
else
echo (odbc_error ().": ".odbc_errormsg ()."<BR>");
}
##
## must close, otherwise php 4.05RC1, 4.06 crashes
##
odbc_close ($con);
echo ("ende");
?>
in PHP4.06 I get the following php errormsg:
Warning: SQL error: , SQL state 00000 in SQLPrimaryKeys in
c:/arbeit/test/odbc2.php4 on line 23
00000:
I tried all the combinations of setting the parameters with spaces
and/or "%", no chance.
Gustav Graf
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13604&edit=1