SQL Update Query

  • Thread starter Thread starter Weste
  • Start date Start date
W

Weste

My app has Access 2003 for the FE and SQL 2005 for the backend. I am trying
to run the following update query from Access.

"UPDATE tblSources SET ImportID = 1, LastUpdate = #" & Now() & "# WHERE ID =
1"

I get an error message regarding the LastUpdate field. It says error near
the 4 which is the hour from the Now() function. The code works file with an
MS Access BE but not with SQL server. Any help would be appreciated. Thanks.
 
I've only ever used SQL Server in an ADP environment, but there are two
things that I can think of to try that might solve your problem:

Use single-quotes as a date delimiter instead of #'s.
Change the date format to SQL Server standard using Format(Now(), "mm/dd/yy
h:nn:ss am/pm") and see if that helps.


Rob
 
Back
Top