?
Solved

ADOConnection data Short Time field shows incorrect date

Posted on 2003-02-19
7
Medium Priority
?
342 Views
Last Modified: 2010-04-04
Am using ADOConnection in Delphi6, over an Access97 database containing Short Date and Short Time fields.

When using Access to look at data all is fine.  Dates are dates alone, time is time alone.

The ADOConnection onto the same file/record set shows the correct short date (without the time) but the short time is always displayed in the DBGrid with an incorrect date, which is not needed.

Is the problem with ADO Delphi components, or with the database engine (Jet 3.5)? and how do you get around the problem?
0
Comment
Question by:mornao
7 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7981282
its just because a date is also stored there

just add a fill the displayformat property of the underlying TField

meikl ;-)
0
 
LVL 1

Author Comment

by:mornao
ID: 7986384
The data is displayed via a generic DBGrid with the data file defined externally, so the displayformat of the grid should not change.  As the date also has a time saved with it, why is that having the time removed from display, yet the date is displayed when a short time is needed?
0
 
LVL 1

Author Comment

by:mornao
ID: 8119398
While the field does contain a date/time time aspect, it's displaying when not filled in is due to there are TWO flavours of Access, only one type can exist in Delphi at any one time. The database may well have been Access97, but whoever installed Delphi6 installed Access2000, which while it can access Acces97 objects, does so with errors such as these.  Sorry, No points awarded.
0
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!

 
LVL 27

Expert Comment

by:kretzschmar
ID: 8119544
>only one type can exist in Delphi at any one time
is not true
0
 
LVL 1

Author Comment

by:mornao
ID: 9238793
Status still unanswered, and have converted all databases to Access2000.  Problem has not gone away, but has been reduced by saving all fields as TDATETIME, and in code using the datetostr and timetostr as appropriate.
0
 
LVL 10

Expert Comment

by:kacor
ID: 9927959
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       PAQ and refund points
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9974896
PAQed, with points refunded (50)

Computer101
E-E Admin
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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

621 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