27-05-20, 01:39 AM
(آخر تعديل لهذه المشاركة : 28-05-20, 12:44 AM {2} بواسطة اسامه الهرماوي.)
وعليكم السلام...
تفضل:
تفضل:
كود :
Try
TextBox1.Text = datagridview1.CurrentRow.Cells(0).Value.ToString()
Catch ex As Exception
End Try
If con.State = ConnectionState.Closed Then
con.Open()
End If
Dim cmd1 As New sqlCommand
cmd1.Connection = con
cmd1.CommandType = CommandType.Text
cmd1.CommandText = "DELETE FROM الجدول WHERE عمود_الترقيم_التلقائي = " & Val(TextBox1.Text) & ""
cmd1.ExecuteScalar()
con.Close()
MsgBox("تم الحذف بنجاح")المبرمج لا يفكر في المشكلة بل في الحل!!

