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

Who's logged in the database !!! again

Status
Not open for further replies.

easycode

Programmer
Jan 28, 2005
195
US
Hi all

i have a little problem over here, i need to know who is logged in to the database that works in a network envinronment with windows xp. I have used the ShowUserRosterMultipleUsers function that is available in the microsoft web page and it works nice, but the only problem is that it shows admin for all users.

Computer_Name Login name Connected SuspectState
FL52213 admin True Null
FL55022 admin True Null
FL56429 admin True Null


so i have used the function fOSUserName that is available in the net writen by Dev Ashish which returns the network login name, i have tested in 3 pc's and i get this result

Computer_Name Login name Connected SuspectState
FL52213 smithg True Null
FL55022 smithg True Null
FL56429 smithg True Null

The computer name is ok but the login name shows the same for all the 3 pcs.

All i need is the login name be the right one for each pc, i am running this routine on the first pc FL52213 and the other 2 are logged in the same application.


Does anyone have a suggestion. i thank you in advance



 
admin" is the default login to Access. If you don't have user-level security set up (meaning users don't need to enter a user name and password), then all of your users are "admin" as far as Access is concerned.
 
Hey KornGeek, thanks for your response

I agree with what you say, i do not have access user-level security set up, but i have a customized user level security and the users have to enter a user id and a password to login the application.

That's why i need to capture the network login name (the user id for windos xp in this case)

if anyone has any idea please reply thank you.

 
you can right click my computer and click on manage in the manage window you can click on shared folders and then open files there you can easily see what computer is using the database file

hope you got it and hope i got you
 
Thanks for replying IGPCS, but that is not the solution because if i have like a hundred users at the same time in the database i am not going to each computer to findo out the computer name, but if i have the network login name it's easy to know.

When you login your windows you will see something like:

Welcome to windows
user id:
password:

that user id is the one i want but not one by one i want to get it programmatically using the api functions i already have one have it's not working.
IOf anyone has any other suggestion please post it.

Thank you very much
 
if i have like a hundred users at the same time in the database
In an msaccess database ? You are serious ?

the api functions i already have one have it's not working
I guess this function is perfectly working for what it is supposed to do, ie retrieve the network login name from who is currently calling it.
You may consider WMI to get the name of the user currently logged on a remote PC.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for your answer PHV
Can you explin what is a WMI?

and also the "if i have like a hundred users at the same time in the database" was just a sample, but let's say i have 3 users and i would like a display like this

Computer_Name Login name Connected SuspectState
FL52213 smithg True Null
FL55022 finklea True Null
FL56429 riveraf True Null

am i asking too much, or may be that i am not explaining correctly. All i want is to get the newtwork id of all users currently in the database, I dont need the login name for the user level security because i have a customized security level, i dont want to get the "admin " login id for all users, nut instead i want either the network id or if anyone can tell me how cabn i get the id from my customized security level,
All i do in my cusotmized security level is ask the user for an id and a password that is saved in an encripted table of course i can get from the pc i running but hoe can i get if there is 5 users running at the same time. If you read in the postings before i would get the same last name for all 5 users.

Thanks for any ideas.
 
if you are connected thru a server you can see the login name as well on winxp you might want to check i think you can
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top