"Can't lock file" error for database using visual basic

12-04-2002, 08:59 AM
Ok, I have searched this board for a while now trying to find the answer, and it seems that no one has really answered the problem at hand. I am running a vb6.0 app on serveral windows 2000 boxes that all must connect to an access database. i have tested the program here on my local machine (as a single user on the database) and the program runs fine, not a bug in site.

I installed the same program on another machine here on the network, and it worked fine as well. We both opened the program at the same time, modified the database at the same time, and everything, and still everything works fine. these tests were run on windows xp boxes.

The solution I need is this. I am delivering this software to another company where like i said, they are using 2000 boxes. when one user tries to open the program, they get the can't lock file error. they now have full control of the database (the it guys over there were big on security and had the security controls down to basically read-only). yet still, it doesn't work. the catch is this, the it guys who have administrative privileges, as well as the supervisor, run the program with no gliches.

Does anyone have an answer to any of this. Is it because of the Windows xp deal? is it because of the visual basic way of dealing with the database (I am dao for this one, i could change to ado if necessary), or is it because the users don't have admin privileges (as a side note, i do not have admin privileges on the network here at work, and in fact the database was stored in a very secured folder on the network when it was running here)

any help would be great


12-04-2002, 09:20 AM
Sounds like the IT guys need to give their users Write/Create rights on the folder that the database is stored in. Otherwise, Access can't create its lock file (<databasename>.LDB), hence the "Can't lock file" error. (Basically, less security is more.)

Access only supports up to 255 concurrent connections, so make sure that's not an issue as well.

12-04-2002, 09:34 AM
we are looking at only about 8 connections at one time. and that will occur once in a blue moon, i would say at one time no more than 3 people would ever be connected, so that isn't an issue.

as for the it guys giving them those permissions, they have full permissions now, they created a new group with full control permission for these guys and applied it to the database and folder. i don't think that should be a problem. i will talk to them about that and make sure they did apply those securities (or lack there of) to the folder and database both.

until then, any help other than this would be great.


12-04-2002, 09:58 AM
You shouldn't need to do anything else as far as permissions go. Just make sure that the IT people don't arbitrarily remove them. If they continue to get the error, let me know.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum