prowebinteractive
asked on
mysql insert staement not working
here is the code Im using, code compiles without errors, but no records in DB
Dim SqlString As String = "INSERT INTO profiles (nom, prenom, doorNumber, address) VALUES (" & TextBox1.Text & ", " & TextBox2.Text & ", " & TextBox8.Text & ", " & TextBox9.Text & ")"
Try
Using conn As New MySql.Data.MySqlClient.MyS qlConnecti on(myConne ctionStrin g)
Using cmd As New MySql.Data.MySqlClient.MyS qlCommand( String.For mat(SqlStr ing), conn)
conn.Open()
End Using
End Using
Catch ex As MySql.Data.MySqlClient.MyS qlExceptio n
MessageBox.Show(ex.Message )
End Try
Dim SqlString As String = "INSERT INTO profiles (nom, prenom, doorNumber, address) VALUES (" & TextBox1.Text & ", " & TextBox2.Text & ", " & TextBox8.Text & ", " & TextBox9.Text & ")"
Try
Using conn As New MySql.Data.MySqlClient.MyS
Using cmd As New MySql.Data.MySqlClient.MyS
conn.Open()
End Using
End Using
Catch ex As MySql.Data.MySqlClient.MyS
MessageBox.Show(ex.Message
End Try
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER