ID:               13604
 Comment by:       kaspernj at gmail dot com
 Reported By:      phperror at gustl dot at
 Status:           No Feedback
 Bug Type:         ODBC related
 Operating System: W98, W98SE
 PHP Version:      4.0.6
 New Comment:

Hi,

I have the exact same problem with the latest CVS of PHP 5.1,
Access-database saved with Access 2003, Windows XP 32bit with SP2 and
all the latest updates (11-08-2006).

The warning I get is this:
Warning: odbc_primarykeys(): SQL error: , SQL state 00000 in
SQLPrimaryKeys in D:\phpprogs\knj_sqladmin\DBConn.php on line 357

...with the following code:
<?
   $f_gpk = odbc_primarykeys($this->conn, "", "", $tablename);
?>

$this->conn is being used many times, before it fails on
"odbc_primarykeys()", so I have established a connection to the Access
database - I am sure. It is possible to read the tables data.

odbc_columns() works as espected.
odbc_tables() works as espected.


Previous Comments:
------------------------------------------------------------------------

[2003-07-12 03:04:09] sa_kelkar at yahoo dot com

I have same problem with odbc_primarykeys when i am using with the DB2.
Please guide me

my code is
<?php
        //include 'conn.inc';

$usernm="db2admin";
$pwd="nic20pao03lx#";
$schemaname="db2admin.";
$conn=odbc_connect("PAOLX",$usernm,$pwd);

$m=odbc_primarykeys($conn,"SYSIBM","SYSIBM","TB_DDO_ELECTRICITY");
echo $m;
?>

------------------------------------------------------------------------

[2002-09-09 01:00:03] php-bugs at lists dot php dot net

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".

------------------------------------------------------------------------

[2002-08-05 20:38:19] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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 dot albert at ualberta dot 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

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/13604

-- 
Edit this bug report at http://bugs.php.net/?id=13604&edit=1

Reply via email to