Dim con As New MySqlConnection
Dim cmd As New MySqlCommand
Try
con.ConnectionString = "Database=account ;Data Source=localhost;User Id=root;Password=root;Allow Zero Datetime=true"
con.Open()
cmd.Connection = con
cmd.CommandText = "update account_num SET (Password)Values(@Password) WHERE User = @User"
cmd.Parameters.AddWithValue("@Password", Me.pass.Text)
cmd.Parameters.AddWithValue("@User", Me.User.Text)
cmd.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show("Error while inserting record on table..." & ex.Message, "Insert Records")
Finally
con.Close()
End Try
Tag : ASP.NET MySQL, Win (Windows App), VS 2010 (.NET 4.x), Windows