|
Posted by Steve on 11/23/05 22:46
In article <1132758318.005926.297590@o13g2000cwo.googlegroups.com>,
chadlupkes@gmail.com (chadlupkes) wrote:
> *Subject:* Re: Using PHP to pull from MS Access DB
> *From:* "chadlupkes" <chadlupkes@gmail.com>
> *Date:* 23 Nov 2005 07:05:18 -0800
>
> Here's the latest update:
>
> <?php
> $connectionstring = odbc_connect("DFWDB", "chad", "dfw");
> if (odbc_error())
> {
> echo odbc_errormsg($connectionstring);
> }
> odbc_close($connectionstring);
> ?>
>
> This is what comes out:
>
> 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
> C:\Inetpub\wwwroot\politics\DFW\connecttodb.php on line 2
>
> Warning: odbc_errormsg(): supplied argument is not a valid ODBC-Link
> resource in C:\Inetpub\wwwroot\politics\DFW\connecttodb.php on line 5
>
> Warning: odbc_close(): supplied argument is not a valid ODBC-Link
> resource in C:\Inetpub\wwwroot\politics\DFW\connecttodb.php on line 7
>
> --
> This doesn't make sense. I don't have any other connections open to
> the database, although I can't get the ODBC logfile to work to check.
> I haven't set any restrictions on access, since this is all on my
> local
> machine, although I'm not sure what permissions I need to set. And
> the
> odbc_ functions just seem to fail.
>
> I'm really lost.
>
>
Try
$conn = odbc_connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" .
"database_name.mdb","chad","dfw");
taken from a working model here.
- Steve
[Back to original message]
|