Re: How to update my access to current date??
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 10/02/04
- Next message: Bob Barrows [MVP]: "Re: Maxium amount of time to execute script error"
- Previous message: Evertjan.: "Re: Problem with response.Cookie"
- In reply to: D: "How to update my access to current date??"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 2 Oct 2004 07:21:54 -0400
D wrote:
> Hi, got a problem here. I try using the following sql statement..
>
> strSQL = "UPDATE Messages(TABLE) SET Date=now() where MessageID=25"
>
> The error given to me:
> Syntax error in UPDATE statement.
>
> I'm doing an update of the date already stored in my Access. How do i
> resolve this problem?? Thanks
>
John is correct. You used a reserved keyword for a column name (Date). This
should be avoided, but if you cannot change the column name, you can work
around it by surrounding the column name with brackets [] when you use it in
your sql statements executed via ADO:
... SET [Date]=now() ...
For more words to avoid in your databases, see here:
http://www.aspfaq.com/show.asp?id=2080
Bob Barrows
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
- Next message: Bob Barrows [MVP]: "Re: Maxium amount of time to execute script error"
- Previous message: Evertjan.: "Re: Problem with response.Cookie"
- In reply to: D: "How to update my access to current date??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|