【发布时间】:2012-04-07 12:42:25
【问题描述】:
我正在将 D7 应用程序转换为 D2009,并且遇到了 Advantage 数据库服务器(本地)的问题。每当我在查询中包含非参数化土耳其语字符时,我都会收到错误
[iAnywhere Solutions][Advantage SQL][ASA]
Error 5211: There is an error converting Unicode string to or from code page string.
Some Unicode characters cannot be converted to code page characters.
我试过在命令中使用 ansistrings,比如 in;
AdsQuery1.SQL.Text:=AnsiString('SELECT something FROM sometable WHERE somefield=''somelocalçharaçterş'' ');
但无济于事。我还将 AdsConnection 的 AdsCollation 值设置为 ANSI、OEM、TURKISH-1254,但结果是一样的。有什么想法吗?
【问题讨论】:
-
在我看来,由于问题只发生在您使用 非参数化查询 时,解决方案将非常明显:使用 参数化 查询.不? :)
-
是的,但这会非常耗时。我一直在寻找对 AdsConnection 部分进行某种调整或某种调整...
标签: delphi unicode delphi-2009 advantage-database-server