dbTalk Databases Forums  

[Info-Ingres] Ingres2006R2, C# and II_TIMEZONE_NAME

comp.databases.ingres comp.databases.ingres


Discuss [Info-Ingres] Ingres2006R2, C# and II_TIMEZONE_NAME in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Bowes
 
Posts: n/a

Default [Info-Ingres] Ingres2006R2, C# and II_TIMEZONE_NAME - 12-18-2008 , 03:49 AM






Hi All,



Since upgrading an installation to II 9.1.1 (a64.lnx/103)NPTL + p13159,
we have found that C# applications now seem to be running with
II_TIMEZONE_NAME = GMT rather than the installation default of
UNITED-KINGDOM.



This is what the programmers have shown me...

I am working on backup database, and run following query in Ingres
Eclipse API:



select studyid, clinic_location_code, creation_date from consent2 where
studyid like '120000012';



which returns:



studyid clinic_location_code creation_date

--------- -------------------- ---------------------

120000012 NULL 2005-05-31 00:34:27.0



I run the same query in our DBTourist, and the result is the same as:



31/05/2005 00:34:27



However, I run the same query in Ingres C# API, and I got:

studyid clinic_location_code creation_date

120000012 <none> 30/05/2005 23:34:27



This was not the case before you recent update. My code doesn't work
now.



Has anyone seen this before, got any ideas?



Martin Bowes



Reply With Quote
  #2  
Old   
Rob Leather
 
Posts: n/a

Default Re: [Info-Ingres] Ingres2006R2, C# and II_TIMEZONE_NAME - 12-18-2008 , 04:00 AM






I will be out of the office now until Friday 19th December, and will
respond to your e-mail as soon as I can upon my return.

If the matter is urgent, please raise a call via the ICT
Helpdesk.


This e-mail and any files transmitted with it are the property of the
London Borough of Havering, are confidential, may be subject to legal privilege
and are intended only for the person(s) or organisation(s) named above.
Any unauthorised use, retention, distribution, copying or disclosure
is strictly prohibited. If you receive this email in error, please notify
the sender immediately and delete this e-mail from your system.
WARNING: It is your responsibility to take all necessary steps to
ensure this e-mail and any attachments to it are free from viruses.

The Mayor of London is giving ten lucky London parks up to £400,000.
Two parks in Havering could win this money, Harrow Lodge Park and
Central Park. Visit www.london.gov.uk/parksvote and register your vote.
Voting closes on Friday 30th January 2009.



Reply With Quote
  #3  
Old   
Kristoff
 
Posts: n/a

Default Re: Ingres2006R2, C# and II_TIMEZONE_NAME - 12-22-2008 , 02:53 AM



Hi Marty,
When a client does not specify the timezone to use, Ingres always
assumes the GMT timezone.
The .NET data provider does not II_TIMEZONE_NAME at all(it doesn't
require an Ingres installation), so you can not specify the timezone
with that variable. However, you can specify the timezone in the
connectionstring by setting the TZ attribute, i.e. you add TZ=UNITED-
KINGDOM to the connection string.
I can't see any difference when applying a patch on the Linux server
(and I don't see it when running a small test program against patch
13159).
Please note that the TZ property only affects the way how the the dbms
converts a string to a date or a date to a string - if the C#
application converts a date into a string the regional timezone
settings of the Windows installation affects the conversion. To avoid
any confusion, it is wise to use the corresponding timezones in Ingres
and in the OS.

Cheers
Kristoff

PS: This is the same as in JDBC

Reply With Quote
  #4  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] Ingres2006R2, C# and II_TIMEZONE_NAME - 12-22-2008 , 04:40 AM



Quote:
When a client does not specify the timezone to use, Ingres always
assumes the GMT timezone.
Why wouldn't it use the installation default at the server end?

My users are pretty adamant it was doing that until we upgraded the
installation to R2.

Marty




Reply With Quote
  #5  
Old   
Kristoff
 
Posts: n/a

Default Re: Ingres2006R2, C# and II_TIMEZONE_NAME - 12-22-2008 , 08:15 AM



Quote:
My users are pretty adamant it was doing that until we upgraded the
installation to R2.
No, this was always the case. If the JDBC or .NET client doesn't
specifies the timezone, GMT is assumed. In fact this was a big problem
with the JDBC driver coming with II 2.6, as it didn't allow to specify
the timezone.
But may be your users don't use the .NET Dataprovider, but ODBC.NET?
In this case II_TIMEZONE_NAME on the ODBC client is considered.

Kristoff





Reply With Quote
  #6  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] Ingres2006R2, C# and II_TIMEZONE_NAME - 01-12-2009 , 05:46 AM



Hi Kristoff,

Would the same problem occur with II_DATE_FORMAT?

I have a situation where it appears the ODBC and JDBC connection
disagree on the II_DATE_FORMAT even though both client and server have
the same setting of II_DATE_FORMAT.

It appears that the ODBC connection is not getting the II_DATE_FORMAT.

Marty

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Kristoff
Sent: 22 December 2008 14:16
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] Ingres2006R2, C# and II_TIMEZONE_NAME

Quote:
My users are pretty adamant it was doing that until we upgraded the
installation to R2.
No, this was always the case. If the JDBC or .NET client doesn't
specifies the timezone, GMT is assumed. In fact this was a big problem
with the JDBC driver coming with II 2.6, as it didn't allow to specify
the timezone.
But may be your users don't use the .NET Dataprovider, but ODBC.NET?
In this case II_TIMEZONE_NAME on the ODBC client is considered.

Kristoff



_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres



Reply With Quote
  #7  
Old   
Kristoff
 
Posts: n/a

Default Re: Ingres2006R2, C# and II_TIMEZONE_NAME - 01-12-2009 , 06:45 AM



None of the II_... variables has any meaning when using JDBC or
the .NET Data provider, but for both you can define a date_format with
the connection string.

ODBC is different, as it requires an Ingres (client) installation. I'm
not 100% sure, but II_DATE_FORMAT should have a meaning when using
ODBC. At least it has a meaning when the DBMS has to convert to/from
date to/from string, i.e. for example varchar(date('now')) uses the
II_DATE_FORMAT setting of the client.

Kristoff

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.