Possible?

Cosmicnoodle

Registered User.
Local time
Today, 22:38
Joined
Jun 14, 2005
Messages
33
I am system administrator for a small, very rigid call handling database.
I want to know if there is any way I can find out who is logged into my database at any time (live check).
The database runs from a .mdb file but there are no tables in the database that I can find where this info is stored - merely usernames/password info.

Ideally I would like to display this onto a form - almost as a log in diagram.

Any ideas?
 
Last edited:
If the tables are not hidden, then the usernames and passwords are hard-coded.
if the login details are not hardcoded, then you need to unhide the tables.
There many exmaples in this forum on this issue. Try to search in the Repository.
 
the problems isn't that i cannot tell the username or password, but simply if they are logged in at a given time
I have access to the username/password table - but it is very basic and doesn't have a 'STATUS' field (i.e logged in or not)

I am just looking to run a query that will give me a list of all users logged in.... now!

:)

Any help would be great

P.S
I want to create this query in a seperate .mdb file I am creating for reports - the log in info I require is in my call handling database that uses a seperate file - not sure if this was clear
 
Last edited:
Ok, it seems that the logged on info must be hard coded - what I was hoping for was a field in a table somewhere that simply was populated when the user logged in, and null when they werent. This was far too hopefull!

The usernam/password is stored into a table. Is there any way to extract this info from a lock file?

Or to query the external .mdb and get this info out somehow?

I was expecting to have to run a query, based on code, much like the fOSUsername example on this forum for retrieving the username used to log into windows, but for another file!
 
I often check out the database lock file by opening it in Word - it's not pretty but you can often see a computer id, or login name to identify people.

Shift - rightclick the lock file and choose 'open with'.

I haven't tried but it'd probably work with notepad, certainly notepad2.
 
what you can do is to extract all tables from that external db to your current database.
Get that login details table name.
Make a form bound to that table, and create a textbox and make it bound to the password field. That should show you the password.
If it displays in astericks. Create a message box like this.
MsgBox "Your Password Is:" & vbCrLf & " " & Me![UserPassword], , "Stop Hacking"

Hope You are not Hacking Boy!!
 
Ok,
let me clear this up - I do not need to see a users u/name & p/word.
I need to see which users are logged onto my call handling database via my reporting app (access 2000) at any given moment.

The lockfile viewing is fine, but i need this info linked into my reporting app - and it needs to be live and/or queriable!?


Hope this helps clarify things....
 
Check out the Who's logged on for Access 97 sample for it demonstrates how to read the .ldb file into a list box in a form. The .ldb file will list the users computer name and their current user name. If you are not using Access security then the defaut user name is Admin.
 
that is perfect - however, it needs to be modified and this seems to require talents greater than mine!

This works fine in the demo, but when I import that form into my application, it doesnt work?
I get the error 'User defined type not defined' refering to:

Private Function WhosOn() As String

On Error GoTo Err_WhosOn

Dim iLDBFile As Integer, iStart As Integer
Dim iLOF As Integer, i As Integer
Dim sPath As String, x As String
Dim sLogStr As String, sLogins As String
Dim sMach As String, sUser As String
Dim rUser As UserRec ' Defined in General
Dim dbCurrent As database

' Get Path of current database. Should substitute this code
' for an attached table path in a multi-user environment.

Set dbCurrent = DBEngine.Workspaces(0).Databases(0)
sPath = dbCurrent.Name
dbCurrent.Close



Also how do i modify this code to look at the .ldb file of another database?

Any ideas? Im stumpted!
 
Try adding a reference to the Mircosoft DAO 3.x Object Library.
 
ok, feeling like a true amateur now!
How do I do that - and more importantly, what does that do exactly?
 
Cosmicnoodle said:
ok, feeling like a true amateur now!
How do I do that - and more importantly, what does that do exactly?
Open any code module, click the menu option Tools / References...

Scroll down the list of available references and select the Mircosoft DAO 3.x Object Library and click the OK button. The code should then work for you.
 
Hmmm, thats strange, the code seems to be working now - but it isnt returning any values or presenting any errors?

That link works fine to display users logged on to current db in VB but I need this info on a form, and also refering to another database...

Im sooo fussy! :D

Any ideas people?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom