problem connecting w/ODBC

From: Date: Sat, 15 Mar 2003 00:12:56 +0000
Subject: problem connecting w/ODBC
Groups: php.db 
Request: Send a blank email to php-db+get-26388@lists.php.net to get a copy of this message
Hello, I am having problems accessing a database through ODBC. I first sent an email describing my problems accessing an MS Access database through PHP. Today I installed MySQL. I have no problems accessing my test database with the mysql commands. I downloaded MySQL's ODBC driver. I get the same error message trying to access this database w/ODBC as I did with the MS Access database. I am running Windows XP Professional, PHP 4.3.1, and Apache 1.3.27. Here's my PHP code: $connection = odbc_connect("testmysql", "", "") or die ("Couldn't connect to the server."); $sql = "SELECT * FROM member"; $result = odbc_exec($sql,$connection) or die ("Couldn't execute query"); 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\test4.php on line 17 Couldn't execute query Anyone have any ideas of what I should do so I can access a database through ODBC? ---------------------- Beverly Steiner steiner277@charter.net

« previous php.db (#26388) next »