我的项目有问题。
这是我的代码:
<!-- language: lang-vb -->
Private Sub BtnSimpanMysql_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSimpanMySql.Click
CbbKelas.SelectedItem = " '" & CbbKelas.SelectedItem.ToString() & "' "
For baris As Integer = 0 To DGV.Rows.Count - 1
konek()
Dim hapusdb As New MySqlDataAdapter("DELETE FROM '" & CbbKelas.SelectedItem.ToString() & "' WHERE no = '" & DGV.Rows(baris).Cells(0).Value & "'", conn)
Dim isi As New DataTable
hapusdb.Fill(isi)
Next baris
DGV.Refresh()
图片1:
图片2:
我希望使用组合框选项 DELETE / INSERT INTO / UPDATE 我的数据到动态表。因此,当我在组合框中选择表名时,它将 DELETE / INSERT INTO / UPDATE 。