Please support MBCS parameter name.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Minoru
Posts: 16
Joined: Sat 11 May 2013 05:19

Please support MBCS parameter name.

Post by Minoru » Tue 13 Aug 2013 03:54

Hello,

i'm using UniDac 5.0.2 with Japanese Delphi7 (MS-CodePage is 923).
At oracle 11g, the following SQL statement , Paramater name writing by MBCS(Japanese katakana).
http://en.wikipedia.org/wiki/Japanese_writing_system

Code: Select all

SQL.text := 'select * from テーブル where コード = :コード';
ParambyName('コード').asstring = 'code1'; 
This name was not found.
Hex code is 8352(コ) 815B(ー) 8368(ド). TrailByte 0x5B is '[' by ascii.

Looks like not support MBCS SQL strings in TParser.

There are many MBCS(Not unicode) users in Japan.
Can this be supported?

Thanks.

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

Re: Please support MBCS parameter name.

Post by AlexP » Wed 14 Aug 2013 08:41

Hello,

Thank you for the information, we have reproduced the problem and will investigate the behaviour. For the time being, to solve the problem, you should explicitly quote names of tables and parameters.

Code: Select all

SQL.text := 'select * from "テーブル" where "コード" = :"コード"';
ParambyName('"コード"').asstring = 'code1'; 

Minoru
Posts: 16
Joined: Sat 11 May 2013 05:19

Re: Please support MBCS parameter name.

Post by Minoru » Wed 14 Aug 2013 20:41

Hello,

I tried your suggestion, result is correct,
but it can be understood as without a double-quote code.

Code: Select all

//ParambyName('"コード"').asstring = 'code1';
ParambyName('コード').asstring = 'code1';
Another example, this code is correct with D7's DBX, but wrong with UniDac.

Code: Select all

SQL.text := 'select * from "テーブル" where "コード" = :"Code"';
ParambyName('Code').asstring = 'code1';  
//ParambyName('"Code"').asstring = 'code1'; //"Code" is not found error.
//ParambyName('code').asstring = 'code1'; //Correct(case-insensitive in ascii range)
i think that incompatible the Delphi's SQL parser.
Thanks.

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

Re: Please support MBCS parameter name.

Post by AlexP » Thu 15 Aug 2013 11:03

Hello,

Thank you for the information. We will try to fix this behaviour in the nearest future

Minoru
Posts: 16
Joined: Sat 11 May 2013 05:19

Re: Please support MBCS parameter name.

Post by Minoru » Thu 15 Aug 2013 21:40

Hello,

Thanks for your support.
I will contact to support at devart.com.

Post Reply