Re: ADO, ShortDateFormat and Terminal Services/Citrix
- From: "Isaac Alexander" <isaacNOSPAM@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 26 May 2008 07:38:09 -0700
"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.
.
- References:
- ADO, ShortDateFormat and Terminal Services/Citrix
- From: Isaac Alexander
- ADO, ShortDateFormat and Terminal Services/Citrix
- Prev by Date: Re: ADOQuery Command Text does not return a result set
- Next by Date: Re: ADOQuery Command Text does not return a result set
- Previous by thread: ADO, ShortDateFormat and Terminal Services/Citrix
- Next by thread: [EQ] About Ado managing !?
- Index(es):
Relevant Pages
|
|