Question Multi-User Environment Issues!

aussie92

Registered User.
Local time
Yesterday, 22:50
Joined
Jan 14, 2013
Messages
13
Hey Everyone -

I need help!!! I have a lauching today and it is not going well....

I have a database where everything is determined by user ID (which I have the database pick up based on the computer). My problem is, anytime someone tries to pull a form, it throws an error saying that someone is already in the database. It gives the computer number of who that is so I know it is not a bogus error, but I have tried everything and it does not let users access anything at the same time!!!

I have the database split and I tried having users download the front end and even rename it and it still says if someone is in the db!! How is that possible when it is a copy?

Please help! If you need more information, I will glady provide it!

Thanks!!​
 
When you open an Access database or when Access opens it for you in the case of getting data from the BE, Access creates a lock file in the same directory as the database being opened. It has the same file name as the database it controls but its extension is .ldb when it is controlling an .mdb/.mde and .laccdb when it is controlling an .accdb/.accde/.accdr. This lock file is used to manage concurrent users so Access can keep track of who is viewing/updating what. If the lock file already exists, it "logs" you in. When the last user closes the database, Access deletes the lock file.

This means that all users need CRUD permissions to the directory on the server that holds the BE. If they cannot create (C) files in that directory, Access will open the database read only and lock others out or prevent it from opening at all. And likewise, if they don't have delete (D) permission, Access can't delete the lock file for them if they are the last user to exit the database so this will leave the lock file hanging around.
 
Thanks for the reply...

I have been using several other databases, set up the same way, that everyone can enter with no problem.

The only thing different about this one is the Temp Vars. Is that related to what you are saying about lock files? Because they have always worked before...
 
This doesn't have anything to do with TempVars unless people are actually sharing a FE. Then anything could happen.

Are all the BE's in the same directory?
 
Each user has a copy of the FE on their local machine. Each FE links to one BE...

Should their be more?
 
No. The question was - Are the BE's that work in the same directory as the BE that doesn't work?
 
Yes - all files are in the same directory.

I actually merged the BE and FE back, and now it works a little better... I am still finding some bugs for some reason, but I think its just a matter of carefully debugging at this point.

Do you know of any reason why the following macro wouldnt work using a split db?


Code:
Option Explicit
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSUsername() As String
' Returns the network login name
    Dim lngLen As Long, lngX As Long
    Dim strUserName As String
    strUserName = String$(254, 0)
    lngLen = 255
    lngX = apiGetUserName(strUserName, lngLen)
    If lngX <> 0 Then
        fOSUsername = Left$(strUserName, lngLen - 1)
    Else
        fOSUsername = ""
    End If
End Function
 
What you posted isn't a macro. It is a VBA function. Having a split database would not affect this code. However, if you are using the 64-bit version of Office (I'm asking about OFFICE not WINDOWS), you will need to change this code to reference the 64-bit dll and you might also need to change the data types of some of the arguments.

Rejoining the FE to the BE is a step in the wrong direction. All the bad things you have ever read about Access corrupting data and being unstable are related to the monolithic database. Split the database for best results.
 

Users who are viewing this thread

Back
Top Bottom