السلام عليكم حد يقولي احل الايرور ده ازاي
للعلم ده الكود
Private Sub SaveBtn_Click(sender As Object, e As EventArgs) Handles SaveBtn.Click
da.SelectCommand = New SqlCommand("select * from users", con)
da.Fill(ds, "Tab1")
dt = ds.Tables("tab1")
Dim row As DataRow = dt.NewRow
row("username") = TxtUserName.Text
row("password") = TxtPass.Text
row("EmpId") = ComboBox1.SelectedValue IsNot ComboBox1.Text
row("use_add") = CheckBox1.Checked
row("use_delete") = CheckBox2.Checked
row("modification") = CheckBox3.Checked
dt.Rows.Add(row)
cmdb = New SqlCommandBuilder(da)
da.Update(dt)
MsgBox("تمت الإضافه بنجاح", MsgBoxStyle.Information)
DataGridView1.DataSource = ds.Tables("users")
End Sub
ليه مافيش حد بيرد
للعلم ده الكود
Private Sub SaveBtn_Click(sender As Object, e As EventArgs) Handles SaveBtn.Click
da.SelectCommand = New SqlCommand("select * from users", con)
da.Fill(ds, "Tab1")
dt = ds.Tables("tab1")
Dim row As DataRow = dt.NewRow
row("username") = TxtUserName.Text
row("password") = TxtPass.Text
row("EmpId") = ComboBox1.SelectedValue IsNot ComboBox1.Text
row("use_add") = CheckBox1.Checked
row("use_delete") = CheckBox2.Checked
row("modification") = CheckBox3.Checked
dt.Rows.Add(row)
cmdb = New SqlCommandBuilder(da)
da.Update(dt)
MsgBox("تمت الإضافه بنجاح", MsgBoxStyle.Information)
DataGridView1.DataSource = ds.Tables("users")
End Sub
ليه مافيش حد بيرد