php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21844 ODBC_CULUMNS problems
Submitted: 2003-01-23 09:23 UTC Modified: 2003-01-24 16:37 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: rickw at ednet dot co dot uk Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.2.3 OS: W2K
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rickw at ednet dot co dot uk
New email:
PHP Version: OS:

 

 [2003-01-23 09:23 UTC] rickw at ednet dot co dot uk
Im using Access 2k with PHP 4.2 win32 binary.

Im simply trying to query the columns in a table, thus;

--
$conn = odbc_connect( 'DSN_NAME', 'root', '' );

$cols = odbc_columns($conn, "%", "", "[table]");
--

This returns the error;

--
Warning: SQL error: , SQL state 00000 in SQLColumns in ......
--

I have seen previous postings in various places regarding this issue but no mentions of a fix/workaround anywhere???

Whats the problem with this?  Is it the odbc drivers for windoze or somthing code related (although the above follows the manual to a 't')?

Cheers,

Rick.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-23 10:25 UTC] kalowsky@php.net
If I remember correctly the issue isn't the MS driver, or the code, but the Access JET engine.  The '%' driver I believe is not supported by the JET engine and as such fails on all attempts.  Unfortunately I can't test to prove it right now, so give that a try.
 [2003-01-23 22:42 UTC] rickw at ednet dot co dot uk
Thanks for that although Im sure thats not it.

Ive tried every variation of;

--
$cols = odbc_columns($conn, "%", "", "[table]");
--

as reported on this site and phpbuilder.

Also, elsewhere Im using

--
$query =  "WHERE Surname LIKE '$search_val%';"
                                          ^
--

with no problems.  But maybe it handles this differantly.  I have seen hoards of postings about this but no official line from the good people at php.net.  Knock up a quick access table and test it yourself... you'll see what I mean.

Rick.
 [2003-01-24 16:37 UTC] kalowsky@php.net
Fixed in the 4.3.0 branch... 
5.0 branch patch in local CVS, not yet uploaded...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 08 14:01:33 2025 UTC