Unix Technical Forum

Re: Date Field With Access and SQL Server 2000

This is a discussion on Re: Date Field With Access and SQL Server 2000 within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> I know this very late but I just saw this and hopefully this response will help someone. In a ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:35 PM
codesmith
 
Posts: n/a
Default Re: Date Field With Access and SQL Server 2000


I know this very late but I just saw this and hopefully this response
will help someone.



In a SQL script, date fields must be prefixed and suffixed with a #.

Try this instead:



CurrentDb.Execute "UPDATE Items SET Items.LastOrderDate

= #" & OrderDate & "# WHERE (Items.FormID)='" & FormID & "';"



I use it all the time and it works fine.



Also since you are using Access (2000 I assume), open the Visual
Basic help by choosing help from a Module window. On the Index tab
enter a Keyword search for: 'SQL date'. There are examples on how to
make it work.



Cheers


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:34 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com