Hi,
I have a web service that records the status of our engineers, e.g on route,
on site, departed or abort current job. This uses DateTime.Now.ToString("F")
to record when each of the above actions are completed. On my dev server,
W2K3 enterprise, SQL Server 2000 (SP3) and all regional settings set to UK,
everything works fine. However when I deployed the service on our production
machine, running W2K3 Std, SQL Server 2000 (SP3) and all regional settings
set to UK, some - but not all, of the date are in the US long date format.
This breaks some of database inserts. I have checked and double checked the
regional settings on the server and source devices and they are all set to
UK.
As a temp fix I added Thread.CurrentThread.CurrentCulture = new
CultureInfo("en-GB") to each affected methods.
Is there something I'm missing? Has anyone experienced a similar problem?
Mark
Ignus Fast - 18 Mar 2005 15:42 GMT
Why wouldn't you use a database TODAY type command directly in the SQL
INSERT command instead of generating it in code first? Just curious...
Ignus
> Hi,
>
[quoted text clipped - 15 lines]
>
> Mark
Mark Irvine - 18 Mar 2005 16:05 GMT
Hi,
The app may operate in a disconnected environment, so the datetime at insert
may not be the correct one.
Mark
> Why wouldn't you use a database TODAY type command directly in the SQL
> INSERT command instead of generating it in code first? Just curious...
[quoted text clipped - 20 lines]
>>
>> Mark
Mark Irvine - 21 Mar 2005 11:26 GMT
Hi,
Problem solved:
http://www.codeproject.com/script/comments/forums.asp?forumid=12076&select=10621
83&tid=1062183#xx1062183xx
Mark
> Hi,
>
[quoted text clipped - 28 lines]
>>>
>>> Mark