Wrong symbols in TWideStringFiled with custom size

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Iliev
Posts: 7
Joined: Fri 18 Dec 2009 12:06

Wrong symbols in TWideStringFiled with custom size

Post by Iliev » Sat 19 May 2012 13:46

Hello,

I'm porting a project from DBX + Devart DBXDriver to ODAC. While I'm doing this I have several problems that I'm trying to solve. Currently I have problem with TWideStringFiled when I manually set custom size of field.

I have OraSession with UseUnicode property set to true and OraQuery. I manually create Fields at design time via FieldsEditor->CreateAllFields. All string fields are TWideStringField, which is OK. Then I manually set size property of one of these fields to 10 for example (actual size is 20). At this moment I have 3 problems:

Problem #1: When I open OraQuery the filed with custom size show the whole string (20 chars) not only first 10 chars as I expected - DBX behavior was to show only first 10 chars.

Problem #2: I create a ClientDataset component and OraProveder to link CDS with OraQuery. Then I manually create Fields at design time via FieldsEditor->CreateAllFields (in ClientDataset). While CreateField is executing OraQuery field size is changed back to 20 and field in CDS is created with size 20! I think this behavior is wrong - the field in OraQuery must stay with size 10 and field in CDS must be created with size 10.

Problem #3: When I manually set size of the these fields back to 10 (both in OraQuery and CDS), the field in CDS shows first 10 char, but strange symbols appears at the end of text. I think this is a buffer problem.

I can send you a simple test project if you want.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Wrong symbols in TWideStringFiled with custom size

Post by AlexP » Mon 21 May 2012 12:04

Hello,

We know about such behaviour, we will review the possibility of changing the behaviour of defining string length in one of the next versions.

Post Reply