Wrong symbols in TWideStringFiled with custom size
Posted: 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.
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.