this code is saying theres something wrong with the syntax but it worked last way i used it.....

vb Code:
  1. Sub useringo()
  2.         Dim conn As MySqlConnection
  3.  
  4.         'connect to DB
  5.         conn = New MySqlConnection()
  6.         conn.ConnectionString = "server=localhost; user id=user; password=pess; database=login"
  7.         'see if connection failed.
  8.         Try
  9.             conn.Open()
  10.         Catch myerror As MySqlException
  11.             MessageBox.Show("Error Connecting to Database: " & myerror.Message)
  12.         End Try
  13.         Dim myAdapter As New MySqlDataAdapter
  14.  
  15.         Dim sqlquery As String
  16.         sqlquery = "select * from userlist Where username='" & My.Settings.unam & "'" & "Insert (name, site, message, about, youtube, myspace, email) VALUES( ?name, ?site, ?message, ?about, ?youtube, ?myspace, ?email)"
  17.         Dim myCommand As New MySqlCommand()
  18.         myCommand.Connection = conn
  19.         myCommand.CommandText = sqlquery
  20.         myCommand.Parameters.AddWithValue("?name", Form4.TextBox1.Text)
  21.         myCommand.Parameters.AddWithValue("?site", Form4.TextBox3.Text)
  22.         myCommand.Parameters.AddWithValue("?message", Form4.TextBox4.Text)
  23.         myCommand.Parameters.AddWithValue("?about", Form4.TextBox5.Text)
  24.         myCommand.Parameters.AddWithValue("?youtube", Form4.TextBox6.Text)
  25.         myCommand.Parameters.AddWithValue("?myspace", Form4.TextBox7.Text)
  26.         myCommand.Parameters.AddWithValue("?email", Form4.TextBox8.Text)
  27.      
  28.         'start query
  29.         myCommand.ExecuteScalar()
  30.         conn.Close()
  31.     End Sub

the below code is causeing me loads of issues i dunno ware i went wrong it looked like it would work in theory but in practice aprrently not

vb Code:
  1. Sub getsinfo()
  2.         Dim conn As MySqlConnection
  3.  
  4.         'connect to DB
  5.         conn = New MySqlConnection()
  6.         conn.ConnectionString = "server=localhost; user id=username; password=password; database=login"
  7.         'see if connection failed.
  8.         Try
  9.             conn.Open()
  10.         Catch myerror As MySqlException
  11.             MessageBox.Show("Error Connecting to Database: " & myerror.Message)
  12.         End Try
  13.         Dim myAdapter(8) As MySqlDataAdapter
  14.  
  15.         Dim sqlquery As String
  16.         Dim sqlquery2 As String
  17.         Dim sqlquery3 As String
  18.         Dim sqlquery4 As String
  19.         Dim sqlquery5 As String
  20.         Dim sqlquery6 As String
  21.         Dim sqlquery7 As String
  22.  
  23.         sqlquery = "SELECT name FROM userlist Where Username='" & My.Settings.unam & "'"
  24.         sqlquery2 = "SELECT site FROM userlist Where Username='" & My.Settings.unam & "'"
  25.         sqlquery3 = "SELECT message FROM userlist Where Username='" & My.Settings.unam & "'"
  26.         sqlquery4 = "SELECT about FROM userlist Where Username='" & My.Settings.unam & "'"
  27.         sqlquery5 = "SELECT youtube FROM userlist Where Username='" & My.Settings.unam & "'"
  28.         sqlquery6 = "SELECT myspace FROM userlist Where Username='" & My.Settings.unam & "'"
  29.         sqlquery7 = "SELECT email FROM userlist Where Username='" & My.Settings.unam & "'"
  30.        
  31.         Dim myCommand(8) As MySqlCommand
  32.  
  33.         myCommand(0).Connection = conn
  34.         myCommand(1).CommandText = sqlquery
  35.         myCommand(2).CommandText = sqlquery2
  36.         myCommand(3).CommandText = sqlquery3
  37.         myCommand(4).CommandText = sqlquery4
  38.         myCommand(5).CommandText = sqlquery5
  39.         myCommand(6).CommandText = sqlquery6
  40.         myCommand(7).CommandText = sqlquery7
  41.         'start query
  42.         myAdapter(1).SelectCommand = myCommand(0)
  43.         myAdapter(2).SelectCommand = myCommand(1)
  44.         myAdapter(3).SelectCommand = myCommand(2)
  45.         myAdapter(4).SelectCommand = myCommand(3)
  46.         myAdapter(5).SelectCommand = myCommand(4)
  47.         myAdapter(6).SelectCommand = myCommand(5)
  48.         myAdapter(7).SelectCommand = myCommand(6)
  49.         myAdapter(8).SelectCommand = myCommand(7)
  50.         Dim mydata(6) As String
  51.         mydata(0) = myCommand(1).ExecuteScalar
  52.         mydata(1) = myCommand(2).ExecuteScalar
  53.         mydata(2) = myCommand(3).ExecuteScalar
  54.         mydata(3) = myCommand(4).ExecuteScalar
  55.         mydata(4) = myCommand(5).ExecuteScalar
  56.         mydata(5) = myCommand(6).ExecuteScalar
  57.         mydata(6) = myCommand(7).ExecuteScalar
  58.  
  59.         profile.Label1.Text = mydata(0)
  60.         profile.LinkLabel1.Text = mydata(1)
  61.         profile.Label2.Text = mydata(3)
  62.         profile.TextBox1.Text = mydata(4)
  63.         profile.LinkLabel2.Text = mydata(5)
  64.         profile.LinkLabel3.Text = mydata(6)
  65.         profile.Label3.Text = mydata(7)
  66.     End Sub

>.< i really need help i have no idea whats wrong with this