Re: Problem updating a Date value into Access DB
- From: "Bob Butler" <tiredofit@xxxxxxxxxxx>
- Date: Tue, 5 Dec 2006 12:20:07 -0800
<jtrainaldi@xxxxxxxxx> wrote in message
news:1165348259.679086.307290@xxxxxxxxxxxxxxxxxxxxxxxxxxx
I have tried everything with updating a database record and it still
errors on the date.
I have tried the following
SQL_query_courseUpd = "UPDATE courses SET [date] = #" & _
Format$(date1,"mm/dd/yyyy") & "# WHERE courseID = '" & courseID & "'"
"date" is a bad choice for a field name because it's a reserved word so you
have to escape it by using "[date]"
Jet needs dates to be in the format #mm/dd/yyyy# or #yyyy-mm-dd# for
consistent results; if you don't specify a format and the local PC uses
dd/mm/yyyy formatting then you will be recording the wrong dates
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
.
- Follow-Ups:
- Re: Problem updating a Date value into Access DB
- From: Sona Karthikeyan
- Re: Problem updating a Date value into Access DB
- References:
- Problem updating a Date value into Access DB
- From: jtrainaldi
- Problem updating a Date value into Access DB
- Prev by Date: Problem updating a Date value into Access DB
- Next by Date: Text file SCHEMA
- Previous by thread: Problem updating a Date value into Access DB
- Next by thread: Re: Problem updating a Date value into Access DB
- Index(es):