DateTimePicker problems

Posted on 2005-04-05
Medium Priority
Last Modified: 2012-06-27
I've got a problem with the standard DatetimePicker in Delphi.

On some PC's where my app is ran I get the following error:
'Failed to set calendar date or time'

These machines are running windows XP and connecting to an SQL Server database, although on some of the other XP pc's connecting to the same database it works fine.

As this error does not happen on my PC which is running Win2K with Delphi7 I cannot catch where it is going wrong.  So I have put messages into the forms create and show to try and catch it but it is not getting to the form show event messages.

I am opening the form with following code if that helps anyone:
  frmDate := TfrmDate.create(self);

Also tried making a small app which calls a window with a datetimepicker on it and it works fine on all the pc's.

Has anyone ever saw this error or know a fix for it?

Question by:scotdance
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
LVL 17

Expert Comment

ID: 13707074

Check Windows regional settings of date/time. Perhaps the computers giving that error have different setting compared to your computer (and other XPs where the program runs OK). I suppose that you're setting/getting date/time database fields not considering possible different regional settings somewhere (i.e. hardcoded date/time format or so).

Regards, Geo

Author Comment

ID: 13707672

All the computers are set to the same region which is UK,
And the datepickers are not connected to a database, I am just setting their values to the current date, as their dates are passed into a sql search script I have to do.


Author Comment

ID: 13708776
It appears we may have found the problem here, the XP machines that it did not work on did not have SP2 on them, and once we upgraded them it worked fine, it appears that it was the comctl32.dll that was causing all the problems.

Sorry to have wasted your time.

Thanks for your help anyway

Author Comment

ID: 13725347
Further note we have also discovered that if you have an 'XPManifest' component in your project that might be another cause of this problem.

Thanks Again

Accepted Solution

ee_ai_construct earned 0 total points
ID: 13757884
Question answered by asker or dialog deemed valuable.
Closed, 50 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin

Featured Post

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.

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
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: …
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

771 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