Question with SELECT on Timestamp field in NET-Mode

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
heuckeg
Posts: 5
Joined: Mon 12 Dec 2005 07:41
Location: Mainz, Germany

Question with SELECT on Timestamp field in NET-Mode

Post by heuckeg » Fri 06 Jan 2006 13:25

When I build a SELECT statement with a WHERE clause on a timestamp field, I have a different behaviour of TOraQUERY in normal and net mode.

In normal (= not net) mode I have to define date and time in country dependent format (germany: 'dd.tt.yyyy hh:mm:ss') for WHERE clause and altering value via FieldByName().AsString.

In net mode I have to define date and time in the format 'dd-mmm-yyyy hh:mm:ss' (e.g. 01-Dec-2005 17:00:00) for WHERE clause and country dependent format for altering value via FieldByName().AsString.

Any setting of TOraSession.Options.DateLanguage has no effect.

Is this a well known and also "wanted" behaviour?
Is there perhaps a "workaround" or can I set a value to have a similar
reaction in both modes?

My problem is that I can't use the same code for both modes now.

best regards (and a nice weekend)
Gunter

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Fri 13 Jan 2006 14:32

Net mode does not use parameters of Oracle client from registry.
Try to execute the following statement after establishing connection

Code: Select all

ALTER SESSION SET NLS_TERRITORY ='AMERICA'
TOraSession.Options.DateLanguage affects the NLS_DATE_LANGUAGE parameter.

Post Reply