Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclusive access message 6

Status
Not open for further replies.

KornGeek

Programmer
Aug 1, 2002
1,961
US
I have an Access 2000 database that I have developed. It is deployed to several customers via an InstallShield installer. This installs the front-end, back-end, mdw file, and a desktop shortcut to open the front-end via the correct mdw file. Security is set up so that the database will not open at all with any other mdw file.

When the database opens, it begins by relinking to several individual database files, and then relinking the tables in the backend. I have many customers using this without any problems.

However, I have one customer who is receiving a message stating "You do not have exclusive access to the database at this time." when they open the database. The message is displayed many times in a row. I'm guessing this is somehow related to the relinking of the tables, but there is some other processing that occurs at that point.

There is nobody else using the database when they receive this message. I have had this customer install the database to a different computer, but they received the same results. I have been unable to reproduce this on my computers.

What could be causing this? Could Windows or network permissions play some part in this? I'm (fairly) sure that it has something to do with how they are set up, but I can't figure out what it is.

Thank you.
 
Do the database and the workgroup file have the same name?
If so they must go in different folders.
 
File permissions is likely it... If they only have read only permissions to the front end they can't lock it exclusively. They should still be able to view the Backend this way but not make changes (probably not desireable).
 
Thanks for the replies.

lupins46,
The database and workgroup files have different names, so I can rule that out as the source of the problem.

lameid,
In my tests on my computer, when I limit the user permissions so that they cannot lock the database, I get a "Could not lock database" error message. So far, I have been unable to recreate the error they are encountering.

Any ideas on how I might be able to reproduce their problem?
 
Did you check the folder permissions where your backend db located?
Try to login to your computer as a non admin user and re-produce the problem

________________________________________________________________________
Zameer Abdulla
Visit Me
No two children are alike - particularly if one is yours and the other isn't.
 
I have tried playing around with folder permissions, both for the front-end and the back-end. I have used an administrator account, a limited user account, and a power user account.

The only error message I have been able to reproduce by switching permissions and user accounts is the "Unable to lock database" message. I have not been able to get the "You do not have exclusive access" message.

Any other suggestions? I appreciate the assistance.
 
Where is the backend? On the local machine or network? Could anyone else have the backend opened exclusively?
--Jim
 
They are having this issue on two separate installations. I am unable to get ahold of the user for one of the installations.

The other user provided me with the follow information about her installation:

1) She is using Windows XP Professional.
2) She is using a copy of Access 2002 that she already had installed on her system (as opposed to the Run-Time 2002 that can be installed with our database).
3) She has full Administrator rights under Windows.
4) She installed to the default directories. This installs the front-end to a folder in the Program Files directory of the C:\ drive. The back-end is installed to a subfolder of where the front-end is located.
5) She is able to create, edit, and delete files in both the front-end and back-end folders. (Which was assumed by the Administrator rights, but I had her do this just to be sure.)
6) To her knowledge, they do not have any other security measures in place. However, she is not in IT, and would not necessarily know if they had implemented something.

It appears that folder and file permissions are not an issue here. Everything looks correct to me.

I am planning to send her a debug version of the front-end which displays additional information so that I can narrow down exactly which lines of code are generating the messages.

Are there any other tests I should be running here? Any other ideas of where to look? I appreciate any guidance you might offer.
 
The information provided by my debug version of the database was quite interesting.

The error is occurring when the first form (specified in Startup options) opens. This form is a basic title screen that performs some initialization, such as relinking tables, etc. It launches a hidden form. This hidden form prevents the database from closing prematurely, and uses a timer event to periodically check license validity. The title screen also displays some information (program version, release date, etc.) pulled from a table local to the front-end.

My primary suspects were the Form_Open event of the title screen (where the tables are relinked), or some code from the hidden form. However, using the debug front-end, the database ran all of the Form_Open code, successfully launched the hidden form, and completed the Form_Load event without error. The error occurred at some point after all of these.

The most puzzling piece of this is that I do error handling in every block of code. My error messages are formatted to display the error number and the error description, and they have a custom title in the msgbox. The message ("You do not have exclusive access to the database at this time...") is not formatted in this manner. It is a simple msgbox with the error description and default title.

The error does not seem to be coming from any of my code. Where could it be coming from?
 
The error is definitely coming from the MSAccess application, not the .mdb.

Is their any possibility that there could be two instnaces on the same machine? Maybe one that crashed but left the .ldb file out there? Is your code using dbengine.OpenDatabase anywhere that might cause something like this, even if it's opening a temp db using the default .mdw?

Otherwise, lubins46's post seems the most likely. If you look at this kb article seems to be the only thing I can find that comes close to what you describe.
--Jim
 
jsteph,

It seems to be highly unlikely that there could be two instances on the machine, especially since they have encountered this on two separate machines now.

I have spoken with someone from their IT department, and we are going to set up something where I can remotely access the computer. This way, I can poke around and see if something appears out of place. Often times, we don't think to ask about certain things, but when we see them, they are obvious. I'm hoping it turns out to be something like that.

I have done extensive searching on the Microsoft website, as well as through Google, and lupins46's suggestion and the possibility of two or more users in the database were the only things I found. Neither of these matches what the customer is telling me, but I will soon get to look myself.

I will keep you posted with any further developments.
 
Hi

Do you have the Front end deployed to each users loacl drive, and Backend to a Network share?

If yes all users must have full read/write/create/delete permissions in the network share folder, to enable them to create/update/delete the ldb file when openning and closing the .ldb file. If they do not have theese permissions the error message you describe will result

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken,

I just got done poking around the user's computer. The front-end is installed on the local hard drive, the mdw file is installed in a different folder on the local hard drive, and the back-end is installed on a network share. When logged into the database, a separate ldb is created in each of the three locations. After exiting the database, all three ldb files are removed.

While logged in to access using the mdw file, I was able to open another database and edit it in each of the three locations. Except for the messages (about 30 of them each time the database is opened), everything seems to be functioning perfectly.

I had the user temporarily disable Windows Firewall and his virus scanner to make sure that it wasn't a conflict with those, but that made no difference.

He is not running on a Novell network (which could potentially cause a problem if they were running an old version). Nobody else is connected to the database.

I'm stumped.
[ponder]
 
To deepen the mystery,

I examined the database again, and discovered that I am disallowing the Open Exclusive permission on the database. So, even on my test machine it is not opened exclusively.

The question remains, why is it that on my user's machine Access believes it should be opened exclusively?

 
Hi

Just read you first post even more carefully, and noted:

"it begins by relinking to several individual database files"

If you are linking to tables in "n" (not by any chance about thirty is it? eg your comment "(about 30 of them each time the database is opened), ") .mdb files then user must have full read/write/create/delete permissions in the network share folder where each of these mdb files reside, since .ldb files will also need to be created/updated/deleted there too

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Ken,

I do have about 30 linked tables total, and I am linking to about 15 different files. Most of the files have only one table, and the back-end contains the rest. The files with only one table are used as temporary tables while transferring data to and from a PDA. These tables reside in the same folder as the front-end. Because the front-end successfully creates its ldb file, permissions should not be the issue.

Also, it seems like more than coincidence that the number of messages roughly matches the number of linked tables. However, the database makes it all the way through the relinking code and onto other tasks before displaying these messages. Also, the back-end is not relinked if the links are still intact. This would mean that the database is only relinking about half as many tables when the links are valid, but it still displays the same number of messages.

My customer installed the database into a Win 2K computer that did not have Access installed. He installed the run-time version of Access 2002 that we provide. Everything worked correctly there. He is going to remove Access from his Win XP machine and try installing the run-time version there. If this works, then we will have isolated it to something regarding their Access setup (which seems the most likely candidate at this time).

I appreciate the feedback and the assistance with this.
 
See if the machine has Adobe Acrobat full version on it (6 or 7). You need to apply the patches to correct this issue. 6.02 0r 7.02
 
netgamers,

I will look into this. From the screen shots I received, it appears that he might have Acrobat full version installed. How does this create a problem?
 
Wow!

My customer removed Adobe Acrobat from his computer, and the problem went away. He re-installed Acrobat, and upgraded to 7.02, and the problem was there.

My best guess as to exactly what is happening:

Adobe Acrobat is attempting to add icons to the toolbar or add a new toolbar to the database.

The security we have built into the database prohibits the user from locking the database exclusively (a small but important piece that I had overlooked).

Because the database cannot be locked exclusively, it displays an error message and retries (about 30 times). This occurs after my code has run, when the first form gets focus.


Knowing where the problem orignates is a great first step, but how can I resolve this? Is there a setting under Acrobat to stop it from adding the icons to the toolbar?

I appreciate all of the help that has been offered. I am awarding stars to netgamers for pointing me in the right direction, and to lupins46 for providing a very good answer that will help most people who find this thread in the future.
 
According to my customer, during the installation of Acrobat, you can select Custom Install, and select which programs you want to use PDFMaker. He de-selected Access, and the problem was solved!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top