Results 1 to 6 of 6

Thread: Count Network User

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    8

    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.
    Last edited by rahulcjain; Apr 24th, 2012 at 01:29 AM.

  2. #2
    Lively Member
    Join Date
    Feb 2012
    Posts
    72

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    8

    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.

  4. #4
    Lively Member
    Join Date
    Feb 2012
    Posts
    72

    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

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    8

    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.

  6. #6
    Lively Member
    Join Date
    Feb 2012
    Posts
    72

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width