johnhardy
asked on
database opened exclusively by another user, or you need permission to view its data
I have a domain xxx.co.uk
On the same server I have a domain sslxxx.co.uk
xxx.co.uk has a database which is working OK on my local pc and remote server.
I want to run some of the files of xxx.co.uk on the sslxxx.co.uk
When the pages from sslxxx.co.uk try to use the database connection I get an error message.
The Microsoft Jet database engine cannot open the file 'D:\home\Default\xxx.co.uk xxx2002.md b'. It is already opened exclusively by another user, or you need permission to view its data.
It seems I have the connection correct but that permissions may be wrong.
In database properties Security is set to Internet Guest Account (machineName) full control
Can anyone see where I am going wrong please
Thanks
John
On the same server I have a domain sslxxx.co.uk
xxx.co.uk has a database which is working OK on my local pc and remote server.
I want to run some of the files of xxx.co.uk on the sslxxx.co.uk
When the pages from sslxxx.co.uk try to use the database connection I get an error message.
The Microsoft Jet database engine cannot open the file 'D:\home\Default\xxx.co.uk
It seems I have the connection correct but that permissions may be wrong.
In database properties Security is set to Internet Guest Account (machineName) full control
Can anyone see where I am going wrong please
Thanks
John
Your DB may be in single user mode (default for DBs created using MS Access) with each web site being treated as a single user. You can test this by stopping the web site that can currently access the DB the restarting the DB that cannot currently access it and trying again. If successful you will need to change your DB to multi-user mode. How you do this will depend on what type DB this is (Access or some other) and if you can change the data access methods of these web apps.
ASKER
Thanks
The database is Access 2003, can you say how this can be changed into multi user mode, I thought this was standard?
The database is Access 2003, can you say how this can be changed into multi user mode, I thought this was standard?
What kind of lock are you using in the connection statement.
You must use optimistic lock and no other lock option.
You must use optimistic lock and no other lock option.
ASKER
I cannot see anything about a lock in the code
MM_connUltraCartIIVB_STRIN G = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=D:\home\Default\xxx .co.uk\htd ocs\_hide\ xxx.mdb;"
MM_connUltraCartIIVB_STRIN
It should be in the recordset statement.
rst_name.Open str_source, str_connection, int_cursortype, int_locktype, lng_options
I am talking about int_locktype here.
rst_name.Open str_source, str_connection, int_cursortype, int_locktype, lng_options
I am talking about int_locktype here.
1. Open the DB in Access
2. Go to Tools > Options > Advanced
3. Set Default open mode to "Shared"
4. Set Default locking to "No locks"
5. Save, exit, restart both web apps, and retry
prashsax and johnhardy are talking about how the application handles concurrency (multiple edits to a single record at the same time) with record level locks (or lack thereof). Your problem is that your working web app has opened the DB with exclusive access (aka single user mode). Most applications will use the default open mode of the DB so a simple change from "Exclusive" to "Shared" should correct the problem. Most applications also implement their own methods for handling concurrency so we can set this to "No locks" on the DB and save resources.
If this does not work it is possible that the open mode is coded into your web app. We can address how to fix that if it comes up.
2. Go to Tools > Options > Advanced
3. Set Default open mode to "Shared"
4. Set Default locking to "No locks"
5. Save, exit, restart both web apps, and retry
prashsax and johnhardy are talking about how the application handles concurrency (multiple edits to a single record at the same time) with record level locks (or lack thereof). Your problem is that your working web app has opened the DB with exclusive access (aka single user mode). Most applications will use the default open mode of the DB so a simple change from "Exclusive" to "Shared" should correct the problem. Most applications also implement their own methods for handling concurrency so we can set this to "No locks" on the DB and save resources.
If this does not work it is possible that the open mode is coded into your web app. We can address how to fix that if it comes up.
ASKER
Thanks very much for the explanation
When I checked the settings in the dbase they were as prescribed. Pity!
When I checked the settings in the dbase they were as prescribed. Pity!
Looks like it's coded into the app or dsn. Can you track down the connection string in the code? May look something like this:
"Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\App1\Your_Database_ Name.mdb; Exclusive=1; Uid=Your_Username; Pwd=Your_Password;"
or
"Provider=MS Remote; Remote Server=http://Your-Remote-Server-IP; Remote Provider=Microsoft.Jet.OLE DB.4.0; Data Source=c:\App1\Your_Databa se_Name.md b"
or
"Provider=Microsoft.Jet.OL EDB.4.0; Data Source=\\Server_Name\Share _Name\Shar e_Path\You r_Database _Name.mdb"
or
"ODBC;DSN=MyDSN"
or
"ODBC;FILEDSN=c:\Program Files\Common Files\ODBC\Data Sources\MyDSN.dsn"
Once you have that we should be able to start tracking it down.
"Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\App1\Your_Database_
or
"Provider=MS Remote; Remote Server=http://Your-Remote-Server-IP; Remote Provider=Microsoft.Jet.OLE
or
"Provider=Microsoft.Jet.OL
or
"ODBC;DSN=MyDSN"
or
"ODBC;FILEDSN=c:\Program Files\Common Files\ODBC\Data Sources\MyDSN.dsn"
Once you have that we should be able to start tracking it down.
ASKER
I now have two domains on my local server.
One to simulate the main site and one to simulate the ssl part
I am using dsn and on the local machine they can both see the same dsn connection
These two local domains apear to work correctly.
If I route to the ssl remote server, the database shows an error.
On the remote server I can make a connection from the main site to the dsn, but that dsn name does not show in the ssl domain.
This is because the dsn creation seems only to see paths within that domain rather than globally as the local server sees.
It seems to suggest that dsn cannot be used as it cannot be seen by both domains on the remote server.
Perhaps I should retry with the oledb method again?
The connection string at the moment is
Dim MM_connUltraCartIIVB_STRIN G
MM_connUltraCartIIVB_STRIN G = "dsn=xxxx;"
Thanks for all the help
One to simulate the main site and one to simulate the ssl part
I am using dsn and on the local machine they can both see the same dsn connection
These two local domains apear to work correctly.
If I route to the ssl remote server, the database shows an error.
On the remote server I can make a connection from the main site to the dsn, but that dsn name does not show in the ssl domain.
This is because the dsn creation seems only to see paths within that domain rather than globally as the local server sees.
It seems to suggest that dsn cannot be used as it cannot be seen by both domains on the remote server.
Perhaps I should retry with the oledb method again?
The connection string at the moment is
Dim MM_connUltraCartIIVB_STRIN
MM_connUltraCartIIVB_STRIN
Thanks for all the help
Try going dsnless or with a file based dsn:
for ODBC connection string
"Driver= {MicrosoftAccessDriver(*.m db)};DBQ=C :\App1\You r_Database _Name.mdb; Uid=Your_U sername;Pw d=Your_Pas sword;"
OLEDB connection string
"Provider=Microsoft.Jet.OL EDB.4.0; Data Source=\\Server_Name\Share _Name\Shar e_Path\You r_Database _Name.mdb"
for ODBC connection string
"Driver= {MicrosoftAccessDriver(*.m
OLEDB connection string
"Provider=Microsoft.Jet.OL
Or go back to:
MM_connUltraCartIIVB_STRIN G = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=D:\home\Default\xxx .co.uk\htd ocs\_hide\ xxx.mdb;;M ode=Share Deny None;"
Adding Mode=Share Deny None
MM_connUltraCartIIVB_STRIN
Adding Mode=Share Deny None
One these days I'll actually learn to read. It should look like this:
MM_connUltraCartIIVB_STRIN G = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=\\Server\share\home \Default\x xx.co.uk\h tdocs\_hid e\xxx.mdb; ;Mode=Shar e Deny None;"
Adding Mode=Share Deny None
Changing D:\ to \\Server\share\
MM_connUltraCartIIVB_STRIN
Adding Mode=Share Deny None
Changing D:\ to \\Server\share\
ASKER
Thanks
I notice on the remote main site if I use
Source=D:\home\Default\ ... the connection works OK
If I use Source=\\Server\share\ it fails with the error
Microsoft OLE DB Service Components error '80040e73'
Format of the initialization string does not conform to the OLE DB specification.
Should the word "Server" be replaced with a server name, if so where will I find that please?
I notice on the remote main site if I use
Source=D:\home\Default\ ... the connection works OK
If I use Source=\\Server\share\ it fails with the error
Microsoft OLE DB Service Components error '80040e73'
Format of the initialization string does not conform to the OLE DB specification.
Should the word "Server" be replaced with a server name, if so where will I find that please?
Yes -
Server = the computername of the machine the DB file is located on
Share = share name of the shared folder the DB file is located on
for example
I Let's say I have an Access DB named Sales.mdb on a computer called Mickey. The path to the DB file from that computer is D:\Databases\Financial\Sal es.mdb but if I want to connect to that database accross the network I will need a file share. I share out D:\Databases\Financial as Sales. The path to the DB file from a remote computer would be \\Mickey\Sales\Sales.mdb where Mickey is the computername of the server and Sales is the name of the share.
I hope this makes sense. If not we'll continue after I've had some sleep.
Server = the computername of the machine the DB file is located on
Share = share name of the shared folder the DB file is located on
for example
I Let's say I have an Access DB named Sales.mdb on a computer called Mickey. The path to the DB file from that computer is D:\Databases\Financial\Sal
I hope this makes sense. If not we'll continue after I've had some sleep.
hopefully you'll find a solution thru these
http://support.microsoft.com/kb/295234/en-us
http://support.microsoft.com/kb/300699/en-us
http://support.microsoft.com/kb/295234/en-us
http://support.microsoft.com/kb/300699/en-us
ASKER
I hope you slept well if have done some more tests but so far I cannot get the connection.
I have tried as follows
In IIS IUSR_XXXX-WEB-RAW is the name of the general heading Web Sites
Connection used
MM_connUltraCartIIVB_STRIN G = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=\\IUSR_XXXX-WEB-RAW \share\Smy lXXXX.mdb; ;Mode=Shar e Deny None;"
When this is used as the connection on the ssl site it produces and error of:
Microsoft JET Database Engine error '80004005'
'\\IUSR_XXXX-WEB-RAW\share \SmylXXXX. mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
========================== ========== ===
In IIS smylYYYY is the username of the main site smylYYYY (not the secure site, ie its username under IIS>web sites.)
Connection used
MM_connUltraCartIIVB_STRIN G = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=\\smylYYYY\share\Sm ylYYYY.mdb ;;Mode=Sha re Deny None;"
This gives an error of
Microsoft JET Database Engine error '80004005'
'\\smylYYYY\share\SmylYYYY .mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
========================== ========== ==
Hope this is clear
Thanks for all the help
I have tried as follows
In IIS IUSR_XXXX-WEB-RAW is the name of the general heading Web Sites
Connection used
MM_connUltraCartIIVB_STRIN
When this is used as the connection on the ssl site it produces and error of:
Microsoft JET Database Engine error '80004005'
'\\IUSR_XXXX-WEB-RAW\share
==========================
In IIS smylYYYY is the username of the main site smylYYYY (not the secure site, ie its username under IIS>web sites.)
Connection used
MM_connUltraCartIIVB_STRIN
This gives an error of
Microsoft JET Database Engine error '80004005'
'\\smylYYYY\share\SmylYYYY
==========================
Hope this is clear
Thanks for all the help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much for such a very clear explanation.
I have carried out this method but still cannot make the connection. However with some luck I have a friend who may be able to see where I am going wrong and I will come back soon.
Regards
John
I have carried out this method but still cannot make the connection. However with some luck I have a friend who may be able to see where I am going wrong and I will come back soon.
Regards
John
ASKER
I found that there was a permission required on the site server which was missing. Thanks again for the great assistance
Regards
John
Regards
John
And then if you try and create a connection to it again, it gives you an error.
If you are using database directly, try to make connection using DSN.
I think, this will let you open the database from both the site simultaneously.