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:
Dim conn As MySqlConnection 'connect to DB conn = New MySqlConnection() conn.ConnectionString = "server=localhost; user id=root; password=chart; database=login" 'see if connection failed. Try conn.Open() Catch myerror As MySqlException MessageBox.Show("Error Connecting to Database: " & myerror.Message) End Try Dim myAdapter As New MySqlDataAdapter Dim sqlquery As String sqlquery = "INSERT INTO user (LastName, FirstName, e-mail, Username, Password, Deleted, Administrator, Created) VALUES(?lname, ?firstn, ?email, ?usernam, ?pword, ?Dels, ?admin, ?times)" Dim myCommand As New MySqlCommand() myCommand.Connection = conn myCommand.CommandText = sqlquery myCommand.Parameters.AddWithValue("?usernam", TextBox1.Text) myCommand.Parameters.AddWithValue("?pword", MaskedTextBox1.Text) myCommand.Parameters.AddWithValue("?lname", TextBox4.Text) myCommand.Parameters.AddWithValue("?firstn", TextBox2.Text) myCommand.Parameters.AddWithValue("?email", TextBox3.Text) myCommand.Parameters.AddWithValue("?dels", "False") myCommand.Parameters.AddWithValue("?admin", "False") myCommand.Parameters.AddWithValue("?times", DateString & " " & TimeString) 'start query myCommand.ExecuteScalar()





Reply With Quote