-
Count Network User
Hi buddy is there any ways in vb6 to count how many network user is using my application from the server. i have develop a small application in that i want to provide multi user license to my customer. So how do i check n provide license to my customer.
send me the easiest solution.
Thanks in advance.
-
Re: Count Network User
Is your multi user prog using a database?
If so just add a record called online or sumthing an set it as boolean
Once some one is connected to it set that record as true
Then just loop through all the true records
-
Re: Count Network User
ya its connected with database. But what i need is how do i find that the no. of network user connected to my application. Assume i have given 5 user license to the customer and when the 6 the network machine gets connected to my application than on the 6th network machine it should not run.
i want only the count of network machine connected to my application from server.
-
Re: Count Network User
ok, please bear in mind that im not 100% sure about this, but if using a ADODB
then you could use something like this
Code:
Dim i As Integer
i = 0
'rs=RecordSet (your table)
rs.MoveFirst 'move to start of records
Do 'loop to move to next record
rs.MoveNext
If rs.EOF = True Then
' code to tell user if they are allowed goes here
Else
If rs.Fields("Online") = "True" Then 'Field called Online, if its true then add one to i
i = i + 1
If i > 5 Then
MsgBox "too many" ' speaks for itself really
End If
End If
End If
Loop Until rs.EOF
i hope this is of some sort of use to you, but again im not sure what DB u are using so im not sure if this will apply to you!
good luck
-
Re: Count Network User
This code will wont work out. I thinking about something else. This is nice idea but not for real time application. Is there any method r dll to find the no. of system connected to my application except the server machine. so that i can verify the license given by me is that its 5 or 3 user license. When the 6 the system starts my application from server . it should get a msg showing that u have only limited user license. call vendor for further license.
-
Re: Count Network User
If the code is placed under the form_load event, your prog should check for online users even before anyone tries to log in,
Just make sure that if someone logs in, you set the online field to true and if they log out then set back to false