Re: MS Access Error
| From: | John Lim | Date: | Tue, 13 Nov 2001 19:47:30 +0000 |
| Subject: | Re: MS Access Error | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14293@lists.php.net to get a copy of this message | ||
Check the file permissions on the .mdb file. Make sure it is readable by
everyone.
Bye, John
Paul Lalli <lalli@crd.ge.com> wrote in message
news:20011113170219.25707.qmail@pb1.pair.com...
> Hello,
> I'm just beginning experimenting with MS Access and PHP. I found all the
> tutorials online that explain how to create a DSN for my existing Access
> database, and went through the procedure fine. The DSN I chose is
> "prototype" and the database does not have a username or password. I then
> created a very simple script:
>
> <HTML>
> <HEAD>
> <TITLE>Access connection</TITLE>
> <BODY>
> <?php
> #Open a connection to an access database
> $connection = odbc_connect("prototype","","");
> if ($connection){
> echo "Connection established<br>\n";
> } else {
> echo "Connection NOT established<br>\n";
> }
> ?>
>
> When running this file, I get the following output:
>
> 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 D:\www\Lalli\php\access.php on line 7
> Connection NOT established
>
> The server is running MS WinNT 4.0 SP6, with PHP 4.0. Can anyone help me
> out?
>
> Thank you,
> Paul Lalli
>
>