RES: Re: Getting Column Names from an AS400 Database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cheryl:


In the PHP Manual ;

resource odbc_columns ( resource $connection_id [, string $qualifier [,
string $schema [, string $table_name [, string $column_name ]]]] )

Lists all columns in the requested range. 


Parameters

connection_id  The ODBC connection identifier, see odbc_connect() for
details.
qualifier      The qualifier. 
schema         The owner. 
table_name     The table name. 
column_name    The column name.

I the first email you send: $outval = odbc_columns($conn, "DB#LIBNAME", "%",
"TABLENAME", "%");

$conn is truly a connection object ?

You check if has no errors in the connection processes?

Alejandro M.S.


-----Mensagem original-----
De: Cheryl Sullivan [mailto:csulliva@xxxxxxx] 
Enviada em: quinta-feira, 26 de janeiro de 2012 13:41
Para: Jim Giner; php-general@xxxxxxxxxxxxx
Assunto: RE:  Re: Getting Column Names from an AS400 Database


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 [mailto:jim.giner@xxxxxxxxxxxxxxxxxx]
Sent: Thursday, January 26, 2012 10:31 AM
To: php-general@xxxxxxxxxxxxx
Subject:  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 the
connection object.
Just my guess since I've never used this. 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux