RE: [PHP-DB] How to access a MS Access DB
| From: | Jonathan Villa | Date: | Mon, 31 Mar 2003 21:13:04 +0000 |
| Subject: | RE: [PHP-DB] How to access a MS Access DB | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26070@lists.php.net to get a copy of this message | ||
I believe I posted that thread.
Try odbc_exec instead of odbc_prepare
Let me know if have more problems
---> Jonathan
-----Original Message-----
From: Beverly Steiner [mailto:steiner277@charter.net]
Sent: Monday, March 03, 2003 3:11 PM
To: php-db@lists.php.net
Cc: Beverly Steiner
Subject: RE: [PHP-DB] How to access a MS Access DB
Hello,
I'm new to this list and saw a past discussion in mid-Feb. about how to
access an MS Access DB. I have Apache and PHP installed on my PC
running XP
Professional.
I created a system DSN and got past the odbc_connect but it died in the
odbc_prepare statement. Error message: Warning: odbc_prepare():
supplied
argument is not a valid ODBC-Link resource in c:\perl\htdocs\test2.php
on
line 20
cannot prepare result
Here's my code (w/username and password changed):
$connection = odbc_connect("mctadb", "username", "password") ||
die("cannot
open database");
$sql = "SELECT MeeetingTitle, MeetingDate FROM meeting;";
$sql_result = odbc_prepare($connection, $sql) || die("cannot prepare
result");
Any help would be greatly appreciated,
Beverly Steiner
steiner277@charter.net
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php