27-06-13, 04:42 PM
هذا هو امر التعديل اخي الكريم سجاد
كود :
Dim SavInto As New OleDb.OleDbCommand
Dim adapter2 As New OleDbDataAdapter(SQLstr, Conn)
SavInto.Connection = Conn
SavInto.CommandType = CommandType.Text
SavInto.CommandText = "UPDATE TheTable SET Mall = '" & Trim(TextBox3.Text) & "' , Expiry_date_repairs = '" & Trim(TextBox4.Text) & "' , Repair_Cost= '" & Trim(TextBox5.Text) & "' , Description_repairs= '" & Trim(TextBox6.Text) & "'WHERE Code ='" & m & "' and ID='" & m2 & "'"
Conn.Open()
SavInto.ExecuteNonQuery()
Conn.Close()
Button4.Enabled = False
Button5.Enabled = False
Button3.Enabled = True
TextBox2.ReadOnly = True
TextBox3.ReadOnly = True
TextBox4.ReadOnly = True
TextBox5.ReadOnly = True
TextBox6.ReadOnly = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Button4.Enabled = False
Button5.Enabled = False
Button3.Enabled = True
TextBox2.ReadOnly = False
TextBox3.ReadOnly = False
TextBox4.ReadOnly = True
TextBox5.ReadOnly = True
TextBox6.ReadOnly = True
End Sub