[VB6] Help Please - Licence SYST

Results 1 to 2 of 2
  1. #1
    Newbie braduz is offline
    MemberRank
    Apr 2009 Join Date
    5Posts

    [VB6] Help Please - Licence SYST

    Can somone make a sql table for this????


    PHP Code:
    Attribute VB_Name "Form1"
    Attribute VB_GlobalNameSpace False
    Attribute VB_Creatable 
    False
    Attribute VB_PredeclaredId 
    True
    Attribute VB_Exposed 
    False
    'Dim Events
    Dim hellofuser As New ADODB.Recordset
    Dim helloluser As New ADODB.Recordset
    Dim userlevel As New ADODB.Recordset
    Dim level As String
    Dim fnameuser As String
    Dim lnameuser As String
    '
    Server Details
    Const server "habbzo.co.uk" 'Server Name or Host ~ Localhost if on Homeserver'
    Const username "habbzo_kaka" 'Database Username ~ Include Prefix'
    Const password "Il0vedebb0" 'Database Password ~ Case Sensitive'
    Const database "habbzo_debbo" 'Database Name ~ Include Prefix'
    'End of Server Details

    '
    Login Event Connectthen Read! If correct proceed ;)
    Private 
    Sub Command1_Click()
    Set conn = New ADODB.Connection
    On Error 
    GoTo ERROR
    conn
    .Open "driver={MySQL ODBC 3.51 Driver};server=" server ";uid=" username ";pwd=" password ";database=" database
    Set rs 
    = New ADODB.Recordset
    With rs
    rs
    .Open "Select * from users where user='" user.Text "' and pass='" pass.Text "'"connadOpenDynamicadLockOptimistic
    If .EOF Then
    MsgBox 
    "Wrong Username or Password"vbOKOnly vbCritical"Error"
    Else
    hellofuser.Open "select fname from users where user = '" user.Text "';"conn
    fnameuser 
    hellofuser.GetString
    hellofuser
    .Close
    helloluser
    .Open "select lname from users where user = '" user.Text "';"conn
    lnameuser 
    helloluser.GetString
    helloluser
    .Close
    userlevel
    .Open "select level from users where user ='" user.Text "'"conn
    level 
    userlevel.GetString
    userlevel
    .Close
    Label1
    .Caption "Your authorization: " level
    MsgBox 
    "Welcome " fnameuser lnameuser, , "Login Succssfully!"
    level Mid(level1Len(level) - 1)
    If 
    level "admin" Then
    Form2
    .Show
    Close
    End 
    If
    frmMain.Show
    Unload Me
    End 
    If
    End With
    Exit Sub
    ERROR
    :
    MsgBox "Error! Unable to connect to the database. Please try again..."vbCritical"Habbzo Hotel Authentication ~ Connection Error"
    End Sub
    'Exit Server ~ You will always find someone who won't know where the End is lol!
    Private 
    Sub Command2_Click()
    End
    End Sub 


  2. #2
    Elite Member Smitty is offline
    Member +Rank
    Nov 2004 Join Date
    Kingston, ONLocation
    150Posts

    Re: [VB6] Help Please - Licence SYST

    As far as I can see, the only information you can get from that is there is a table in a database with 5 fields.

    Table: users
    Fields: fname, lname, level, user, pass

    You can find tutorials on how to make tables by Googling which DBMS you're using (mySQL in this case).



Advertisement