Protected Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click
conn.Open()
Dim savinto As New OleDb.OleDbCommand
savinto.Connection = conn
savinto.CommandType = CommandType.Text
savinto.CommandText = " update Patient set Patient_name='" & TextBox2.Text & "', Mobile='" & TextBox3.Text & "', Email='" & TextBox4.Text & "', Address='" & TextBox5.Text & "', Age='" & TextBox6.Text & "', Date_tran='" & TextBox7.Text & "'"
savinto.ExecuteNonQuery()
MsgBox("ok that ")
conn.Close()
End Sub
عند تنفيذ الكود تظهر لي رسالة الخطأ التالية :
Conversion failed when converting datetime from character string.