Results 1 to 9 of 9

Thread: [RESOLVED] sytax error and checking user privlages for chat app and createing a buddy list

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2009
    Location
    Scotland/Japan
    Posts
    164

    Resolved [RESOLVED] sytax error and checking user privlages for chat app and createing a buddy list

    hello i have a chat app im developing and have now got it to login and that but now have a new issue when a user logs in i want it to check what level of privlages the user has then enable the corisponding controls and also set the users tag eg admin(server admin) and so on



    also i want to add a buddy list that shows if a user is online or offline but i have no idea how to display the username's the user adds to there freinds or how to display there status on the buddy list form

    also when the user registers im getting a MYSQL syntax error on this line of code

    vb Code:
    1. Dim conn As MySqlConnection
    2.  
    3.         'connect to DB
    4.         conn = New MySqlConnection()
    5.         conn.ConnectionString = "server=localhost; user id=root; password=chart; database=login"
    6.         'see if connection failed.
    7.         Try
    8.             conn.Open()
    9.         Catch myerror As MySqlException
    10.             MessageBox.Show("Error Connecting to Database: " & myerror.Message)
    11.         End Try
    12.         Dim myAdapter As New MySqlDataAdapter
    13.  
    14.         Dim sqlquery As String
    15.         sqlquery = "INSERT INTO user (LastName, FirstName, e-mail, Username, Password, Deleted, Administrator, Created) VALUES(?lname, ?firstn, ?email, ?usernam, ?pword, ?Dels, ?admin, ?times)"
    16.         Dim myCommand As New MySqlCommand()
    17.         myCommand.Connection = conn
    18.         myCommand.CommandText = sqlquery
    19.         myCommand.Parameters.AddWithValue("?usernam", TextBox1.Text)
    20.         myCommand.Parameters.AddWithValue("?pword", MaskedTextBox1.Text)
    21.         myCommand.Parameters.AddWithValue("?lname", TextBox4.Text)
    22.         myCommand.Parameters.AddWithValue("?firstn", TextBox2.Text)
    23.         myCommand.Parameters.AddWithValue("?email", TextBox3.Text)
    24.         myCommand.Parameters.AddWithValue("?dels", "False")
    25.         myCommand.Parameters.AddWithValue("?admin", "False")
    26.         myCommand.Parameters.AddWithValue("?times", DateString & " " & TimeString)
    27.  
    28.         'start query
    29.         myCommand.ExecuteScalar()
    Last edited by casirus; Sep 18th, 2009 at 11:01 AM.
    Between the world we see and the things we fear theres a realm of possibility

    D.L.H. Ind.

    We do what we do in out life to make Yours Simpler

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