SEE the usernames of people who are using the database

  • Thread starter Thread starter Kan D.
  • Start date Start date
K

Kan D.

Does any one know of a sweet program from mvps.org or somewhere that lists
all the usernames that are presently locking using the database?

Kan
 
use SQL Server you ****ing retard

exec sp_who2 and you're done.

MDB is for ****ing dipshits that can't tie their shoes.
Grow some balls and lose the training wheels.

Access Data Projects are the best platform in the WORLD.

-Aaron
ADP Nationalist
 
I used the referenced code and it works fine...using the immediate window, I
can see the users.

Can anyone tell me how to get the Debug.Print info to come up in another way
(such as a MsgBox?).

Thanks

Bob
 
It won't look all that pretty, since the various fields won't be lined up
one under the other, but try:

Dim strOutput As String

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

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

strOutput = rs.Fields(0).Name & " " & rs.Fields(1).Name & _
" " & rs.Fields(2).Name & " " & rs.Fields(3).Name & _
vbCrLf

While Not rs.EOF

strOutput = strOutput & rs.Fields(0) & " " & rs.Fields(1) & _
" " & rs.Fields(2) & " " & rs.Fields(3) & vbCrLf

rs.MoveNext

Wend

MsgBox strOutput
 
In my applications, I actually display a form with a listbox, and load the
information into the listbox via VBA code. Not difficult to do, but a few
VBA steps are needed. But my code for doing that is not publicly available
at this time.....
 
Doug

When I use this code, the output (MsgBox) I get is the Field Names BUT the
data is not listed ...is there a tweak to this?

Thanks

Bob
 
You'll need to single-step through the code, and make sure that it's
actually getting into the loop and appending to strOutput.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top