|
Posted by steve on 11/23/05 17:23
ok, smiling one. ;^)
usually, one db error will cascade multiple errors in php since most db
functions rely on a resource provided by another db function. anyway...what
you've got is a failure to connect and yet you continue to try to use other
functions that rely on that connection which in turn throws errors number 2
and 3.
your literal problem is that access (shitty as it is) stores its data in a
file. when php tries to open that db/file, your pc tries to access it as
IUSR_<computer name here>...that is, if you're using IIS (incredibly
insecure server). you must allow read/write permissions for that user on the
directory in which your mdb resides.
btw, you do *NOT* need a dsn to connect to the db, as a standard odbc
connection string in the form of:
"Driver={Microsoft Access Driver
(*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;"
will work just fine.
(look at http://www.connectionstrings.com/ for most common connection
strings)
does that explain things to your satisfaction?
| 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.
|
[Back to original message]
|