DateTimePicker problems

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?

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

ee_ai_constructConnect With a Mentor Commented:
Question answered by asker or dialog deemed valuable.
Closed, 50 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin

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
scotdanceAuthor Commented:

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.

scotdanceAuthor Commented:
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
scotdanceAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.