Thanks for your response... I changed the $outval line to 

$outval = odbc_columns($rs, "DB#LIBNAME", "%", "TABLENAME", "%");

...but still got the same error - 

Warning: odbc_columns() expects parameter 1 to be resource, object given
in D:\WAMP\www\directory\filename.php on line 13

-----Original Message-----
From: Jim Giner [] 
Sent: Thursday, January 26, 2012 10:31 AM
Subject: [PHP] Re: Getting Column Names from an AS400 Database

I'm thinking that it should read

$rs = $conn->execute($q);
$outval = odbc_columns($rs, "DB#LIBNAME", "%", "TABLENAME", "%");

You need to provide the results of the query to the odbc_columns, not
connection object.
Just my guess since I've never used this. 

PHP General Mailing List (
To unsubscribe, visit:

Notice: This communication, including attachments, may contain information that 
is confidential and protected. It constitutes non-public information intended 
to be conveyed only to the designated recipient(s). If you believe that you 
have received this communication in error, please notify the sender immediately 
by return e-mail and promptly delete this e-mail, including attachments without 
reading or saving them in any manner. The unauthorized use, dissemination, 
distribution, or reproduction of this e-mail, including attachments, is 
prohibited and may be unlawful. Thank you.

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to