ok can someone help me with this. I am trying to update the table programs. I don't know what to put in the values line
Code:
Dim conn As MySqlConnection
Dim myCommand As New MySqlCommand
'connect to DB
conn = New MySqlConnection()
conn.ConnectionString = ";"
'Dim myCommand As New MySqlCommand
myCommand.Connection = conn
myCommand.CommandText = "INSERT INTO programs(name, type, uploaded, uploader, location)" _
& "'VALUES(?Name, ?Type, ?Uploaded, ?Uploader, ?location)'"
myCommand.Parameters.AddWithValue("?Name", Me.TextBox1.Text)
myCommand.Parameters.AddWithValue("?Type", Me.TextBox2.Text)
myCommand.Parameters.AddWithValue("?Uploaded", Me.TextBox3.Text)
myCommand.Parameters.AddWithValue("?Uploader", Me.TextBox4.Text)
myCommand.Parameters.AddWithValue("?location", www.site.com/files/'" & Me.TextBox4.Text & "'/'" & FileName)
Try
conn.Open()
myCommand.ExecuteNonQuery()
Catch myerror As MySqlException
MsgBox("There was an error updating the database: " & myerror.Message)
End Try