RE: [PHP] PHP and MS Access
| From: | Andrew Hill | Date: | Fri, 05 Apr 2002 14:15:51 +0000 |
| Subject: | RE: [PHP] PHP and MS Access | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91707@lists.php.net to get a copy of this message | ||
Ronan,
Check these:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q306269
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q174943
It's most likely an issue with how you have your DSN setup or how apache is
running.
Best regards,
Andrew Hill
Director of Technology Evangelism
http://www.openlinksw.com/virtuoso/whatis.htm
OpenLink Virtuoso Universal Server
> -----Original Message-----
> From: ronan cleary [mailto:clear_ro@hotmail.com]
> Sent: Friday, April 05, 2002 6:42 AM
> To: php-general@lists.php.net
> Subject: [PHP] PHP and MS Access
>
>
> I am running PHP and Apache and have a problem connecting to an Ms Access
> database
>
> I cannot connect to my database. I am using an Apache Server with
> PHP. Now
> as far as I can see these work fine apart from some dll files in PHP.
>
> I have also set up an ODBC connection to my database, but when I
> try and run
> the PHP code I get errors.
>
> This is the PHP code I am using. The ODBC is called link1 and the
> database
> db1.
>
> <?php
> $db = ODBC_Connect("link1", "","");
> $res = ODBC_Exec($db, "SELECT Employee.Name FROM Employee;");
> while (ODBC_Fetch_Row($res)) {
> echo "<TR><TD>".ODBC_Result($res,
> 'fieldname')."</TD></TR>";
> }
> ODBC_Free_Result($res);
>
> ?>
>
> These are the errors that it returns
>
> X-Powered-By: PHP/4.0.6 Content-type: text/html
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The
> Microsoft
> Jet database engine cannot open the file '(unknown)'. It is
> already opened
> exclusively by another user, or you need permission to view its
> data., SQL
> state S1000 in SQLConnect in o:\program files\apache
> group\apache\htdocs\name1.php on line 2
>
> Warning: Supplied argument is not a valid ODBC-Link resource in
> o:\program
> files\apache group\apache\htdocs\name1.php on line 3
>
> Warning: Supplied argument is not a valid ODBC result resource in
> o:\program
> files\apache group\apache\htdocs\name1.php on line 4
>
> Warning: Supplied argument is not a valid ODBC result resource in
> o:\program
> files\apache group\apache\htdocs\name1.php on line 7
>
>
> Any help on where to go would be great.
>
> Thanks a million
>
> Ronan
>
> _________________________________________________________________
> Join the worlds largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>