SEE the usernames of people who are using the database

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
 
D

dbahooker

use SQL Server you fucking retard

exec sp_who2 and you're done.

MDB is for fucking 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
 
B

bob

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
 
D

Douglas J. Steele

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
 
K

Ken Snell \(MVP\)

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.....
 
B

bob

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
 
D

Douglas J. Steele

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