[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Saving dates older than 1752 using ADO to MS Access?

Posted on 2002-07-05
9
Medium Priority
?
189 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Independent Software Vendors: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…
Suggested Courses

650 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