?
Solved

ADOConnection data Short Time field shows incorrect date

Posted on 2003-02-19
7
Medium Priority
?
340 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
[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
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
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 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

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month8 days, 21 hours left to enroll

764 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