Saving Time value to Access

Stephen

Member
Joined
Feb 22, 2006
Messages
15
Programming Experience
Beginner
Hey,

I keep hitting a wall when trying to save a time value to an Access table from VB .Net. I have set up a DateTime column within a DataGrid that has the following format "dd/MM/yy HH:mm" and the format within the database itself just to the General format. When I enter the date and time within the datagrid and hit the submit button (code supplied below) everything appears to work fine, there are no error messages.

However when I run a crystal report, check the data base itself or reload the data into the datagrid the time has disapeared completly in the case of the database, or displayed as 00:00:00 within the datagrid. Any help would be greatly appreciated!!

Submit button code:

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Try
OleDbDataAdapter1.Update(DsUserData1)
Catch ex As Exception
MsgBox(ex.ToString)

End Try
End Sub
 
Back
Top