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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I find who's in a database by the .LDB file

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I can't make changes if some one is in the Access 2003 database.
Is there a way to find out whos' got it open without running around asking everyone?

Is there a server command that shows which computer has which files open maybe in Windows 2003 Server?

TIA

DougP, MCP, A+
 
do a google search for ldbviewer

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I did thanks and also found this code
Code:
Sub ShowUserRosterMultipleUsers()
    Dim cn As New ADODB.Connection
    Dim cn2 As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    Dim i, j As Long

    cn.Provider = "Microsoft.Jet.OLEDB.4.0"
    cn.Open "Data Source=c:\Northwind.mdb"

    cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
    & "Data Source=c:\Northwind.mdb"

    ' The user roster is exposed as a provider-specific schema rowset
    ' in the Jet 4 OLE DB provider.  You have to use a GUID to
    ' reference the schema, as provider-specific schemas are not
    ' listed in ADO's type library for schema rowsets

    Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
    , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

    'Output the list of all users in the current database.

    Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _
    "", rs.Fields(2).Name, rs.Fields(3).Name

    While Not rs.EOF
        Debug.Print rs.Fields(0), rs.Fields(1), _
        rs.Fields(2), rs.Fields(3)
        rs.MoveNext
    Wend

End Sub
By using Microsoft Visual Basic for Applications in Microsoft Access 2000, you can output a list of users who are logged into a database. The code example in this article show you how to do this.

it prints a list like so
COMPUTER_NAME LOGIN_NAME CONNECTED SUSPECT_STATE
CUSTOMERSERVICE Admin True Null
RECEIVING Admin True Null
CUSTOMERSERVICE Admin True Null





DougP, MCP, A+
 
This Thread thread705-1118350 contains a function (WhosLoggedOn) that will return a recodset with all the above info.
 
many (most? all?) uses of the .LDB file / viewer do not actually (accuratly?) reflect "Who Is Logged ON?". The .LDB is basically just another database/table system -which, like the generic JetDb systems do not actually delete records when the record is deletedm but simply mark them as deleted. In ".LDB" file, the 'residual' record is not (through any process I have found) marked as deleted (or unused), although there obviously must be some indication. The L in LDB stands for L[cking, and refers to the "record" locks associated with the user. The generic purpose is to accomodate the Multiuser apps, to advise the user of conflicts (those pesky message boxes re some one else has the record or has modified the record ...). Further, opne needs to be somewhat aware of the issue that the ".LDB" file is for the specific .MDB, not the overall system. Thus, when you have a split system and look at the .LDB for the FE, you only see users in THAT (specific instance) .MDB, which may have little to do with the BE. Even further afield, is the situation where the FE is individually placed on the individual desktop, that is an 'independent' .MDB and the /LDB file (and viewer) can (and will) only reflect the individual using the desktop. On the system I am currently involved with, I have several seperate situations in the above, and have written the routines to be able to list the "users" of each of the several variations. I often see different lists of individuals in the (Main) FE db and the (Main) BE db, as well as the individual "users" in the "sattelite" dbs.




MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top