Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > "Can't lock file" error for database using visual basic


Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2002, 08:59 AM
dejota6's Avatar
dejota6 dejota6 is offline
Centurion
 
Join Date: Oct 2002
Location: Conway, Arkansas
Posts: 165
Default "Can't lock file" error for database using visual basic


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

thanx
__________________
There are 10 types of people in this world. Those who understand binary, and those who don't.

Baseball is 90% physical. The other half is all mental.
Reply With Quote
  #2  
Old 12-04-2002, 09:20 AM
reaper115's Avatar
reaper115 reaper115 is offline
Regular
 
Join Date: Oct 2002
Location: Kansas City, MO, USA
Posts: 77
Default

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.)

Edit:
Access only supports up to 255 concurrent connections, so make sure that's not an issue as well.
__________________
"Never hold your farts in. They travel up your spine and into your brain, and that's where you get crappy ideas from." - Unknown
Reply With Quote
  #3  
Old 12-04-2002, 09:34 AM
dejota6's Avatar
dejota6 dejota6 is offline
Centurion
 
Join Date: Oct 2002
Location: Conway, Arkansas
Posts: 165
Default

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.

thanx
__________________
There are 10 types of people in this world. Those who understand binary, and those who don't.

Baseball is 90% physical. The other half is all mental.
Reply With Quote
  #4  
Old 12-04-2002, 09:58 AM
reaper115's Avatar
reaper115 reaper115 is offline
Regular
 
Join Date: Oct 2002
Location: Kansas City, MO, USA
Posts: 77
Default

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.
__________________
"Never hold your farts in. They travel up your spine and into your brain, and that's where you get crappy ideas from." - Unknown
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->