Space truncated while updating using OraTable

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
smcgee
Posts: 2
Joined: Thu 11 May 2006 12:57
Location: Dublin

Space truncated while updating using OraTable

Post by smcgee » Thu 11 May 2006 13:19

My Environment:

ODAC 5.70
Delphi 5
Oracle 10G

Hi,

I am wew to this forum.

I am having a small problem -
I am updating a table column with a value of space
but the value is being truncated to ''.

To update the table I am simply using the following code ...
TbF0911Z1.Append;
TbF0911Z1VNPOST.Value := ' ';
TbF0911Z1.Post;

Running a sql statement in SQLPLUS gives me the results that I woudl expect. This rules out that the problem is with the database.
update F0911Z1
set VNPOST = ' '
where VNEDUS = 'ERBOS'

Any one have any ideas what the problem is ??

Regards
Shay

smcgee
Posts: 2
Joined: Thu 11 May 2006 12:57
Location: Dublin

Post by smcgee » Thu 11 May 2006 13:42

Hi again,

I would like to point out the the oracle table I am updating is not
my own - therefore I cannot change its definition.
The column I want to initialise to space is defined as NCHAR(1).

regards
Shay

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Thu 11 May 2006 14:56

Field of type NCHAR(1) or CHAR(1) cannot contain an empty string. This field always contains one character. But when you fetch data in TOraTable component all trailing spaces will be truncated unless property Options.TrimFixedChar is False for the TOraTable component.

Post Reply