469,609 Members | 2,214 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

PHP MsAccess ODBC Connection to database on Networked Volume

I have an IIS 6.0, 2003 Server running with PHP installed.

I have an access database with a DSN ODBC connection configured.

When this ODBC is configured to access the database locally - great,
works fine.
When configured to access a remote copy of this database I get the
following :

"....Warning: odbc_connect() [function.odbc-connect]: 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\PI\getdata.php on
line 3...."

I have tried to set permissions on the database stored on the
networked volume to allow the 'IUSR_servername' user on the web-server
to have rights but am unable. I've tried giving 'everyone' the full
rights to the database all to no avail.

Getting to the stage where I'm going to ask the end user to copy their
database permanantly to the server where the PHP page lives, and give
them a shortcut to it .... but .... it's reaally reaally annoying me
now and I'd like to sort it out properly.

Thanks for any help

Sep 20 '07 #1
4 6283

"Rodent" <de******@gmail.comwrote in message
news:11**********************@19g2000hsx.googlegro ups.com...
>I have an IIS 6.0, 2003 Server running with PHP installed.

I have an access database with a DSN ODBC connection configured.

When this ODBC is configured to access the database locally - great,
works fine.
When configured to access a remote copy of this database I get the
following :

"....Warning: odbc_connect() [function.odbc-connect]: 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\PI\getdata.php on
line 3...."

I have tried to set permissions on the database stored on the
networked volume to allow the 'IUSR_servername' user on the web-server
to have rights but am unable. I've tried giving 'everyone' the full
rights to the database all to no avail.

great! all of that *needed* to be done. however, the error message is not
related to file permissions. what you need to do now, is open up the db on
the network volume in *access*. once open, you need to set the options for
it (tools...options). next, go to the 'advanced' tab and set the 'default
open mode' to shared. close access. finally, go the the network volume where
the .mdb file is. once there, delete all .ldb files. then give it a go.

btw, afaicr, you can also massage some of that in your odbc config and/or
connection string.

i should state that you should *always* use a connection string instead of
actually creating a DSN for access. further, only use access db's when you
plan to have access provide the gui interface as well. mysql (and just about
any other db engine) beats the snot out of ms access in terms of speed,
reliability, and capacity. you'll find that out as soon as you get 2 users
simultaneously hitting it and your mdb file size gets to about 1MB.

but, that's just my 0.02 usd
Getting to the stage where I'm going to ask the end user to copy their
database permanantly to the server where the PHP page lives, and give
them a shortcut to it .... but .... it's reaally reaally annoying me
now and I'd like to sort it out properly.
that would require you to NOT use ms access. ;^)
Sep 20 '07 #2
Normally work with PHP, FreeBSD and MySQL .... any problems can
usually be solved with the aid of google and a few good people like
your self. Unfortunately the user who I'm creating a 'nice browser
based front-end' for doesn't want to migrate her database to something
strange and wonderful like that.

Unfortunately I'm stuck with access and the settings you've just
suggested still give me the same error :-)

Any other suggestions will be gratefully received.... however I'm
getting closer and closer to just copying the bloody thing onto the
server and being done with it. Amazing how 'simple' jobs take s
long :-)

Cheers

Sep 20 '07 #3

"Steve" <no****@example.comwrote in message
news:0o***********@newsfe02.lga...
>
"Rodent" <de******@gmail.comwrote in message
news:11**********************@19g2000hsx.googlegro ups.com...
>>I have an IIS 6.0, 2003 Server running with PHP installed.

I have an access database with a DSN ODBC connection configured.

When this ODBC is configured to access the database locally - great,
works fine.
When configured to access a remote copy of this database I get the
following :

"....Warning: odbc_connect() [function.odbc-connect]: 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\PI\getdata.php on
line 3...."

I have tried to set permissions on the database stored on the
networked volume to allow the 'IUSR_servername' user on the web-server
to have rights but am unable. I've tried giving 'everyone' the full
rights to the database all to no avail.


great! all of that *needed* to be done. however, the error message is not
related to file permissions. what you need to do now, is open up the db on
the network volume in *access*. once open, you need to set the options for
it (tools...options). next, go to the 'advanced' tab and set the 'default
open mode' to shared. close access. finally, go the the network volume
where the .mdb file is. once there, delete all .ldb files. then give it a
go.

btw, afaicr, you can also massage some of that in your odbc config and/or
connection string.

i should state that you should *always* use a connection string instead of
actually creating a DSN for access. further, only use access db's when you
plan to have access provide the gui interface as well. mysql (and just
about any other db engine) beats the snot out of ms access in terms of
speed, reliability, and capacity. you'll find that out as soon as you get
2 users simultaneously hitting it and your mdb file size gets to about
1MB.

but, that's just my 0.02 usd
>Getting to the stage where I'm going to ask the end user to copy their
database permanantly to the server where the PHP page lives, and give
them a shortcut to it .... but .... it's reaally reaally annoying me
now and I'd like to sort it out properly.

that would require you to NOT use ms access. ;^)
Are you specifying a UNC path to the db-file? Or do you use a network share
with drive letter?
I vaguely remember one of the 2 didnt work.
Google probably remembers better than me.

Richard.
Sep 21 '07 #4

"Richard" <root@localhostwrote in message
news:46***********************@news.euronet.nl...
>
"Steve" <no****@example.comwrote in message
news:0o***********@newsfe02.lga...
>>
"Rodent" <de******@gmail.comwrote in message
news:11**********************@19g2000hsx.googlegr oups.com...
>>>I have an IIS 6.0, 2003 Server running with PHP installed.

I have an access database with a DSN ODBC connection configured.

When this ODBC is configured to access the database locally - great,
works fine.
When configured to access a remote copy of this database I get the
following :

"....Warning: odbc_connect() [function.odbc-connect]: 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\PI\getdata.php on
line 3...."

I have tried to set permissions on the database stored on the
networked volume to allow the 'IUSR_servername' user on the web-server
to have rights but am unable. I've tried giving 'everyone' the full
rights to the database all to no avail.


great! all of that *needed* to be done. however, the error message is not
related to file permissions. what you need to do now, is open up the db
on the network volume in *access*. once open, you need to set the options
for it (tools...options). next, go to the 'advanced' tab and set the
'default open mode' to shared. close access. finally, go the the network
volume where the .mdb file is. once there, delete all .ldb files. then
give it a go.

btw, afaicr, you can also massage some of that in your odbc config and/or
connection string.

i should state that you should *always* use a connection string instead
of actually creating a DSN for access. further, only use access db's when
you plan to have access provide the gui interface as well. mysql (and
just about any other db engine) beats the snot out of ms access in terms
of speed, reliability, and capacity. you'll find that out as soon as you
get 2 users simultaneously hitting it and your mdb file size gets to
about 1MB.

but, that's just my 0.02 usd
>>Getting to the stage where I'm going to ask the end user to copy their
database permanantly to the server where the PHP page lives, and give
them a shortcut to it .... but .... it's reaally reaally annoying me
now and I'd like to sort it out properly.

that would require you to NOT use ms access. ;^)

Are you specifying a UNC path to the db-file? Or do you use a network
share with drive letter?
I vaguely remember one of the 2 didnt work.
Google probably remembers better than me.
probably me too. i always used a unc since that's one less thing i'd have
had to remember to do when i moved to production (map a drive and all).
Sep 21 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Graham | last post: by
reply views Thread by Krzysiek | last post: by
5 posts views Thread by Alec | last post: by
9 posts views Thread by laredotornado | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.