Re: ADO, ShortDateFormat and Terminal Services/Citrix




"Isaac Alexander" <isaacNOSPAM@xxxxxxxxxxxxxxxxxxx> wrote in message
news:48373d1d@xxxxxxxxxxxxxxxxxxxxxxxxx
I am using D7.1, MDAC 2.8 and SQL Server 2005.

I have a customer that is serving my application over Terminal Services
and
another on Citrix.

They want to give individual users different date formats (D/M/YYYY or
M/D/YYYY). They implemented a REG file that updates the date format when
the profile starts up. Regional setting changes update the same reg keys.
From a display point of view, it works perfectly.

The problem is when ADO uses localized filtering, it gets the day and
months
values swapped. It's like the ShortDateFormat that windows and my app
uses is different
than the one that ADO uses.

Does anyone know how ADO figures out the ShortDateFormat? Is this a
setting I can update when my app starts like ADOShortDateFormat =
ShortDateFormat or something like that.

The problem doesn't occur on a normal (non-thin client) installation.


Our IT guy found a solution. I owe him a beer. For others having this
problem...

Apparently ADO uses an additional date setting in the registry. Here is the
MS link:

http://technet2.microsoft.com/windowsserver/en/library/7dedbd31-40bd-4f47-a833-517a0b9ab9bb1033.mspx?mfr=true

Here are the registry entries:

ShortDatePath = "HKCU\Control Panel\International\sShortDate"
iDatePath = "HKCU\Control Panel\International\iDate"
ShortDateFormat = "dd/MM/yyyy"
iDateFormat = "1" ' 1 for Canada 0 for the US format
Set Sh = CreateObject("WScript.Shell")
Sh.RegWrite ShortDatePath, ShortDateFormat
Sh.RegWrite iDatePath, iDateFormat
Set sh = Nothing

I learn something new everyday.


.



Relevant Pages

  • ADO, ShortDateFormat and Terminal Services/Citrix
    ... They want to give individual users different date formats (D/M/YYYY or ... The problem is when ADO uses localized filtering, it gets the day and months ... Does anyone know how ADO figures out the ShortDateFormat? ...
    (microsoft.public.data.ado)
  • ADO, ShortDateFormat and Terminal Services/Citrix
    ... Regional setting changes update the same reg keys. ... The problem is when ADO uses localized filtering, it gets the day and months ... It's like the ShortDateFormat that windows and my app uses ... Does anyone know how ADO figures out the ShortDateFormat? ...
    (borland.public.delphi.database.ado)
  • Re: ShortDateFormat Problem
    ... ShortDateFormat:= 'ddmmyy'; ... types: 'Char' and 'string' ... if I set the DateSeparator and the TimeSeparator to '0': ... Use the correct date & time formats. ...
    (comp.lang.pascal.delphi.misc)