Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dat2199
Starting Member
4 Posts |
Posted - 2002-10-14 : 08:38:34
|
I would like to check the number of users accessing a database using MS Visual Basic. Do you know how it could be done?Thanks![url]http://www.getwhatever.com[/url] |
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2002-10-14 : 11:24:52
|
I think that this would be pretty hard to do considering ADO and connection pooling.What exactly are you trying to determine with the "number of connections?" You may need to create a table and for each "login" of your app add a record into the table.These may help you as well. Run them in Query Analyzer.EXEC sp_who orEXEC sp_who2 Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
dat2199
Starting Member
4 Posts |
Posted - 2002-10-15 : 02:11:08
|
I am writing an application which restrict the number of users running this application. To do so, I need to check the number of users accessing the application.[URL]www.getwhatever.com[/URL] |
 |
|
srf
Starting Member
42 Posts |
Posted - 2002-10-16 : 12:53:29
|
So try the ProgramName column of sp_who2 assuming you set the application name in your connection string? |
 |
|
sherrer
64 Posts |
Posted - 2002-10-16 : 13:27:24
|
you can also query master.sysprocesses, depending on your security model... your VB application name will be in the field program_name |
 |
|
|
|
|