#13604 [Fbk->NoF]: odbc_primarykeys with Access
| From: | php-bugs at lists dot php dot net | Date: | Mon, 09 Sep 2002 06:00:03 +0000 |
| Subject: | #13604 [Fbk->NoF]: odbc_primarykeys with Access | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18704@lists.php.net to get a copy of this message | ||
ID: 13604
Updated by: php-bugs@lists.php.net
Reported By: phperror@gustl.at
-Status: Feedback
+Status: No Feedback
Bug Type: ODBC related
Operating System: W98, W98SE
PHP Version: 4.0.6
New Comment:
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2002-08-05 20:38:19] kalowsky@php.net
Using the latest CVS I cannot get your sample code to work at all. It
seems the $tables is never populated on my end. Any chance you can
post a sample schema, or see if this is still happening?
------------------------------------------------------------------------
[2002-07-29 13:58:14] kalowsky@php.net
Jeff please limit yourself to one bug report per bug. If you have
issues with other ODBC functionality, feel free to open a seperate bug
report.
------------------------------------------------------------------------
[2002-07-29 12:55:49] jeff.albert@ualberta.ca
Hello,
I'm having the same problem with win2k, Apache, and PHP 4.2.2,
accessing any of a number of Access databases; the error seems to occur
with any attempt access any of the following functions:
odbc_columns
odbc_columnprivileges
odbc_tables
odbc_tableprivileges
incidentally, occasionally the tables functions will actually cause
php.exe to crash outright. Here's the simplest example of code that
causes the problem:
<?php
$con = odbc_connect("dev", "", "");
$result = odbc_columnprivileges($con, "", "", "", "%");
?>
cheers,
jeff albert
------------------------------------------------------------------------
[2002-06-06 13:00:59] josh@engledental.com
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?
------------------------------------------------------------------------
[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