SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old April 6th, 2000, 07:38 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Updating Dates in Access 2000

<i><b>Originally posted by : Paul (gridiron@tcny.rr.com)</b></i><br />I have spent the last 1/2 day trying to get a date updated in an Access 2000 table via ASP and<br />SQL.<br /><br />If I takeout the following code the update works: (if I don't, I get a SQL syntax error)<br /><br />sSQL = sSQL & "date = #" & newdate & "#,"<br />.... (more sSQL statements)<br /><br /><br />The date field in Access is a short date in the format 00/00/00<br />I perform a Response.write (newdate) before the SQL stuff and it comes out correct - 04/06/00<br /><br />Can someone give me a clue what's going on? I have tried just using the date, changing the #'s <br />to ' - all with the same results. All I really want to do here is to update the date currently in the table <br />with the current date.

Reply With Quote
  #2  
Old April 10th, 2000, 03:28 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Mike B (mikeb811@hotmail.com)</b></i><br />I believe the problem is in your SQL statement. You use " date = " in your SQL string and date is a reserved keyword. Try changing that and the database field name to something else like somedate and see how that works.<br /><br />Hope this helps<br /><br />Mike<br /><br /><br />------------<br />Paul at 4/6/2000 5:38:15 PM<br /><br />I have spent the last 1/2 day trying to get a date updated in an Access 2000 table via ASP and<br />SQL.<br /><br />If I takeout the following code the update works: (if I don't, I get a SQL syntax error)<br /><br />sSQL = sSQL & "date = #" & newdate & "#,"<br />.... (more sSQL statements)<br /><br /><br />The date field in Access is a short date in the format 00/00/00<br />I perform a Response.write (newdate) before the SQL stuff and it comes out correct - 04/06/00<br /><br />Can someone give me a clue what's going on? I have tried just using the date, changing the #'s <br />to ' - all with the same results. All I really want to do here is to update the date currently in the table <br />with the current date.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Updating Dates in Access 2000


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway