18-06-13, 01:40 PM
أو بإمكانك جلب التاريخ المسجل بالكمبيوتر مباشرة عن طريق تعديل الكود السابق إلى:
كود :
Dim SaveHeadSQL As String = "INSERT INTO Table (TheDate) VALUES(@TheDate)"
Dim SaveHeadCMD As New OleDbCommand
If Con.State = ConnectionState.Closed Then
Con.Open()
With SaveHeadCMD
.Connection = Con
.CommandType = CommandType.Text
.CommandText = SaveHeadSQL
.Parameters.AddWithValue("TheDate", [color=#FF0000]Now.Date[/color])
.ExecuteNonQuery()
.Dispose()
End With
Con.Close()
Else
With SaveHeadCMD
.Connection = Con
.CommandType = CommandType.Text
.CommandText = SaveHeadSQL
.Parameters.AddWithValue("TheDate", [color=#FF0000]Now.Date[/color])
.ExecuteNonQuery()
.Dispose()
End With
Con.Close()
End If
