[prev in list] [next in list] [prev in thread] [next in thread]
List: php-general
Subject: [PHP] Getting Column Names from an AS400 Database
From: "Cheryl Sullivan" <csulliva () SHH ! ORG>
Date: 2012-01-26 15:06:27
Message-ID: 487E7D0857FE094590BF2DC33FE3E1080CF58F8C () SHHS-MAIL ! SHH ! ORG
[Download RAW message or body]
Can someone tell me why the following code:
//----------------------------------------------------
$q = sprintf("SELECT * FROM DB#LIBNAME.TABLENAME");
$conn = new COM ("ADODB.Connection")
or die("Cannot start ADO");
$connStr = "Provider=IBMDA400;Password=XXXXXX;User ID=XXXX;Data
Source=999.99.1.100;Transport Product=Client Access;SSL=DEFAULT";
$conn->open($connStr);
$rs = $conn->execute($q);
$outval = odbc_columns($conn, "DB#LIBNAME", "%", "TABLENAME", "%");
//----------------------------------------------------
results in this error being generated on the $outval line?
odbc_columns() expects parameter 1 to be resource, object given in
D:\WAMP\www\directory\filename.php on line 13
Cheryl L. Sullivan
Interface Analyst / Web Developer
Sacred Heart Hospital (www.shh.org <http://www.shh.org/> )
421 Chew Street * Allentown, PA 18102
Office: 610-776-4784
Sacred Heart Hospital - 2011 Greater Lehigh Valley Chamber of Commerce
Business of the Year <http://www.shh.org/news/release.asp?id=145>
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic