mattscotney
Programmer
Hi all,
I am trying to update my Access database through vb.net using the following sql statement:
Dim myDate As Date = Date.Now
selectString = "INSERT INTO Purchase(ClientID, Date) VALUES (50, '" & mydate & "')"
updateDB(selectString)
The Date field in access is a Date/Time type in short date format.
I know there is nothing wrong with my database connection or updateDB procedure as I can update the clientID and other fields without any hassles.
How do I format the date so that access will accept the sql date query?
Thanks,
Matt Scotney
I am trying to update my Access database through vb.net using the following sql statement:
Dim myDate As Date = Date.Now
selectString = "INSERT INTO Purchase(ClientID, Date) VALUES (50, '" & mydate & "')"
updateDB(selectString)
The Date field in access is a Date/Time type in short date format.
I know there is nothing wrong with my database connection or updateDB procedure as I can update the clientID and other fields without any hassles.
How do I format the date so that access will accept the sql date query?
Thanks,
Matt Scotney