Re: problem accessing MS Access DB

From: Date: Wed, 12 Mar 2003 17:13:06 +0000
Subject: Re: problem accessing MS Access DB
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-10330@lists.php.net to get a copy of this message
Did you setup your DSN? It seems to me that your connection didn't work which then caused the exec to fail. Just a guess. Joshua Groboski SAVVIS Communications Inc. http://www.savvis.net "Beverly Steiner" <steiner277@charter.net> wrote in message news:OIEALKEKPENAPMHDJNJDCEJDDAAA.steiner277@charter.net... > Hello, > > I am having problems accessing an MS Access database through PHP and thought > maybe I missed something in the installation process. I set up a System DSN > for the database and went back and forth with a member of the PHP database > mailing list and he can't figure out why it isn't working. > > I am running Windows XP, PHP 4.3.1, and Apache 1.3.27. After installing PHP > I copied php4ts.dll and php4apache.dll to my Windows/system32 folder. I > copied php-recommended.ini to the Windows folder, renamed it to php.ini and > edited the doc_roots line. > > Here's my code: > > $connection = odbc_connect("mctadb", "username", "") || > die("cannot open > database"); > > $sql = "SELECT * FROM Meeting"; > > $result = odbc_exec($connection, $sql) || die("cannot prepare result"); > > I get the following error message in my browser: > > Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in > c:\program files\apache group\apache\htdocs\test2.php on line 30 > cannot prepare result > > > What am I doing wrong? > > ---------------------- > Beverly Steiner > steiner277@charter.net > >

« previous php.install (#10330) next »