Don't display Romanian Charset in DBGrid

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
nschmied
Posts: 72
Joined: Mon 09 May 2005 08:03
Location: Suisse

Don't display Romanian Charset in DBGrid

Post by nschmied » Thu 20 Oct 2005 13:06

I have found a new bug with the laste ODAC.

Create a table with a varchar2(50) field (To a UTF8 database.)

And with Smart Demo use this select
Select tbl.RowID, tbl.* from MyTable tbl
And add a row with special romanian char ţ (UTF8 code C5A3)

Now DBGrid display this char |.

But if you use smart demo with ODAC 5.50 it's work. Strang.....

NSC

nschmied
Posts: 72
Joined: Mon 09 May 2005 08:03
Location: Suisse

Post by nschmied » Thu 20 Oct 2005 13:39

But if I insert chines 量 it's work ??????? I don't understand

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Fri 21 Oct 2005 12:18

We couldn't reproduce your problem, please try to do the following
1) Insert (or update) data to your test table using parameters;
2) Open (or refresh) Dataset linked with this table
3) Read and check field value (using FieldByName)
If value received is not equals to value posted then please send us small demo project with scripts to create server objects.

nschmied
Posts: 72
Joined: Mon 09 May 2005 08:03
Location: Suisse

Post by nschmied » Fri 28 Oct 2005 13:04

I have use demo smart in Dot.NET.
Add a TButton and a TLabel on the form.
and in button1click event add this code.

Code: Select all

procedure TfmMain.Button1Click(Sender: TObject);
begin
    SmartQuery.Close;
    SmartQuery.SQL.text :=  'SELECT TBL.*,'+
      '  TBL.ROWID'+
      ' FROM               '+
      '  MY_TESTS TBL '+
      ' WHERE '+
      '  TBL.MY_TESTS_ID = 6';

    SmartQuery.Open;
    //1) Insert (or update) data to your test table using parameters;
    with OraSession.CreateSQL do
    try
     SQL.Text := 'UPDATE MY_TESTS SET MY_TEXT = :MY_TEXT WHERE MY_TESTS_ID = 6';
     ParamByName('MY_TEXT').DataType := ftWideString;
     ParamByName('MY_TEXT').AsWideString := 'ţ';
     Execute;
    finally
     Free;
    end;
    //2) Open (or refresh) Dataset linked with this table
    SmartQuery.Refresh;
    //3) Read and check field value (using FieldByName)
    Label7.Caption := SmartQuery.FieldByName('MY_TEXT').AsString;

//  end;
end;
script for create table

Code: Select all

CREATE TABLE MY_TESTS
(
  MY_TESTS_ID  NUMBER(12),
  MY_TEXT      VARCHAR2(20 CHAR)
)

INSERT INTO MY_TESTS ( MY_TESTS_ID, MY_TEXT ) VALUES ( 
6, ''); 

COMMIT;

The caption of Label display fine ţ but not the DBGrid. Why ?
Thanks,
nsc

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 31 Oct 2005 16:03

We have tested your example and couldn't reproduce your problem, please send us small demo project that demonstrates your problem.

Post Reply