Different behavior in direct mode

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FreddyTutak
Posts: 1
Joined: Mon 08 Dec 2008 23:40

Different behavior in direct mode

Post by FreddyTutak » Sat 24 Jan 2009 21:39

Hello,

We use UNIDAC 2.00.0.3 on a ORACLE 10g database, with CodeGear Delphi RAD Studio 2007

We notice some differences when running in direct mode (without an oracle client)

1. different sort-order
direct mode : strings starting with 'S (quote + S) come first in order

'S
A
B
...
S
T

via oracle client : strings starting with 'S (quote + S) come just before strings starting with S
A
B
...
'S
S
T

2. problems with date & date/time in update SQL's
UniQuery.ParamByName('LAST_CHANGED').AsDateTime:=now;
via oracle client : no problems
direct mode : error ORA-00932 inconsistent datatype, expected DATE got number

Registry entry for ORACLE client :
NLS_LANG = DUTCH_THE NETHERLANDS.WE8MSWIN1252

specific options set in TUniConnection :
charset WE8MSWIN1252
dateformat DD/MM/YYYY
datelanguage DUTCH

Any idea what the reason is ?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 26 Jan 2009 09:41

1. Sort order differs because NLS_LANG value is not used in the Direct mode. You can solve the problem in two ways:
a) Set NLS_LANGUAGE to DUTCH in the initialization parameter file for the Oracle instance.
b) Execute the following query:
ALTER SESSION SET NLS_LANGUAGE=DUTCH
after connecting to the database.

2. We could not reproduce the problem with date. Please send to unidac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.

Post Reply