From: Jeff S. <why...@ya...> - 2004-03-25 15:55:34
|
OK, you say "I can get MDBTools to connect to the database". Which tool did you use to test this? If you are confident that mdbtools is connecting, the next link in the chain is to check unixodbc. The easiest way I know to do that be run "isql GAL". If it comes up without warnings, that means that part is working, and you may immediately quit the program. -- Jeff Smith --- Shannon Sumner <SS...@co...> wrote: > > Hello, > I'm using Bryan Mills post located at > http://bryanmills.net:8086/archives/000099.html > <http://bryanmills.net:8086/archives/000099.html> to connect PHP on my > Linux Server to an Access database located on my network. I'm having no > problems installing UnixODBC and MDBTools. I can get MDBTools to connect to > the database so I know it's not a network issue. I've completed Bryan Mills > installation steps word for word and yet have not been able to get PHP to > access the data. > Here's the error I get: > odbc_connect(): SQL error: [IBM][CLI Driver] SQL1013N The database alias > name or database name "GAL" could not be found. SQLSTATE=42705, SQL state > 08001 in SQLConnect in /home/mis/access.php on line 2 > I'm convinced since I have IBM DB2 Connect personal addition installed on my > server and use the PHP function odbc_connect to access data on my AS400 that > I cannot use this function to access databases of another type. I'm also > convinced that the DB2 Connect installation has altered my system so that > ODBC.ini no longer contains the information about ODBC drivers. > Do you know how to fix this problem? Does anyone know what file IBM DB2 > connect uses to access it's database drivers? If I had this information - > perhaps I could alter this file as I would the ODBC.ini and receive the > correct data. As you can see I'm totally lost. Any help would be > appreciated. > Thanks, > Shannon Sumner > My odbcinst.ini file looks as this: > > [PostgreSQL] > Description = ODBC for PostgreSQL > Driver = /usr/lib/libodbcpsql.so > Setup = /usr/lib/libodbcpsqlS.so > FileUsage = 1 > [MDBToolsODBC] > Description = MDB Tools ODBC drivers > Driver = /usr/lib/libmdbodbc.so.0 > Setup = > FileUsage = 1 > CPTimeout = > CPReuse = > > My odbc.ini file looks as this: > > [PostgreSQL] > Description = ODBC for PostgreSQL > Driver = /usr/lib/libodbcpsql.so > Setup = /usr/lib/libodbcpsqlS.so > FileUsage = 1 > > [GAL] > Description = Global Address Database > Driver = MDBToolsODBC > Database = /root/GAL.mdb > Servername = localhost > UserName = > Password = > port = 5432 > > My ODBC entries in PHP Info look like this: > > ODBC Support enabled > Active Persistent Links 0 > Active Links 0 > ODBC library db2 > ODBC_INCLUDE -I/home/db2inst1/sqllib/include > ODBC_LFLAGS -L/home/db2inst1/sqllib/lib > ODBC_LIBS -ldb2 > Directive Local Value Master Value > odbc.allow_persistent On On > odbc.check_persistent On On > odbc.default_db no value no value > odbc.default_pw no value no value > odbc.default_user no value no value > odbc.defaultbinmode return as is return as is > odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes > odbc.max_links Unlimited Unlimited > odbc.max_persistent Unlimited Unlimited > > > > ************************************************ > This message has been scanned for computer > viruses and none were found. > > Country Curtains Information Systems Department > ************************************************ > > > > __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html |