Solved

Saving dates older than 1752 using ADO to MS Access?

Posted on 2002-07-05
9
181 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
  • 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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 100 total points
ID: 7247269
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to Add / Edit Windows Menu 4 67
Passing a Text Box name to a Sub 6 99
Problem to With line 4 63
transition to visual .net from vb6 5 37
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

856 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