Dim dt As DataTable = DirectCast(Me.DataGridList.DataSource, DataTable) Using command As MySqlCommand = StrSettingConn.CreateCommand() command.CommandTimeout = 0 command.CommandType = CommandType.Text command.CommandText = "INSERT INTO Demo (Name, Address) VALUES (@Name, @Address)" command.Parameters.Add("@Name", MySqlDbType.VarChar, 100, "Name") command.Parameters.Add("@Address", MySqlDbType.VarChar, 100, "Address") Using adapter As New MySqlDataAdapter() adapter.InsertCommand = command adapter.Update(dt) End Using End Using
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)