?
Solved

Saving dates older than 1752 using ADO to MS Access?

Posted on 2002-07-05
9
Medium Priority
?
187 Views
Last Modified: 2008-02-01
Hello experts,

I am using ADO to save a recordset to an MS Access database. I cant save a any date older than 01/01/1753. I realize this is when the Gregorian calander kicked in.

My code looks like:
rsADO.addnew
rsADO(lcounter - 1) = CDate(strout)

The error when strout is older than 01/01/1753
[Microsoft][ODBC Microsoft Access Driver]Datetime field overflow (null)

Help. I'm stuck.
JAmott
0
Comment
Question by:JAmott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7133238
Please maintain your open questions:

Questions Asked 8
Last 10 Grades Given A C A  
Question Grading Record 3 Answers Graded / 3 Answers Received

Thanks,
Anthony
0
 
LVL 2

Expert Comment

by:yongyih
ID: 7133251
Do you try to set the format of your date field in MS Access or regional setting (date tab) in control panel?

I am not sure can solve your problem or not..  but you can try.. good luck. ^_^
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7133355
Sorry, ADO filed supports since December 30, 1899
In other hand, if you could define the field as adDBDate, it APPEARS to supports any date (A date value (yyyymmdd) (DBTYPE_DBDATE))
Hope it helps
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7133359
Optionally, you could use dateserial function and save the date as double and do the conversion outside db. Just a guess.
0
 
LVL 2

Expert Comment

by:yongyih
ID: 7133968
How about save your data as string with fixed format?
for example dd/mm/yyyy format, 01/01/1753 save as 01011753 or 01/01/1753.

Then you know first two character represent day, last for characters represent year.

But if you do like this, you will have problem when comparing the date using SQL statement. ^_^
0
 
LVL 2

Expert Comment

by:yongyih
ID: 7133973
or may be you can use some SQL command to convert it to date when you need to compare date in sql statement.

0
 

Author Comment

by:JAmott
ID: 7138322
Thanks for you suggestions experts. As it turns out, this is a documented bug with the MS Access ODBC Driver. Check out this link:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q252699

I found out through a friend of mine. Can you beleive this bug still exists? Microsoft eh.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7138361
Please maintain this open question:
passing info from an ACTIVEX Document to a servside ASP page Date: 02/19/2002 09:46AM PST
http://www.experts-exchange.com/visualbasic/Q_20268655.html

Please delete these open questions, since no solutions were offered:
Setting file SHARE property via VB Date: 03/04/2002 02:10PM PST
http://www.experts-exchange.com/visualbasic/Q_20273201.html
How to open and access an ACT! database from VB Date: 02/26/2002 01:26PM PST
http://www.experts-exchange.com/visualbasic/Q_20271337.html
MS Access unicode WITH COMPRESSION Date: 02/10/2002 02:15PM PST
http://www.experts-exchange.com/visualbasic/Q_20265308.html

Thanks,
Anthony
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 400 total points
ID: 7247269
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question