TADOQuery:字段"MyField"的"EDatabaseError类型不匹配,期望:实际的字符串:FixedWideChar" [英] TADOQuery: 'EDatabaseError type mismatch for field 'MyField', expecting: String actual: FixedWideChar'
问题描述
我有3个不同的数据库(开发数据库,同系物和产品),每个数据库都位于以下Oracle版本之一中:11g和10g.
I have 3 different databases (development, homolog and prod), each of them in one of the following Oracle versions: 11g and 10g.
我正在使用TADOQuery一次仅查询其中一个数据库中的某些数据.
I'm using a TADOQuery to query for some data in only one of those databases at a time.
当我在开发人员或产品中运行我的应用程序时,它会完美返回数据.但是当我在同源物中运行它时,出现以下错误消息:
When I run my app in dev or prod it returns the data perfectly. But when I run it in homolog i get the following error message:
'MyData'字段的'EDatabaseError类型不匹配,期望:实际字符串:FixedWideChar'
'EDatabaseError type mismatch for field 'MyField', expecting: String actual: FixedWideChar'
我已经检查过,三个数据库的DDL相同,因此这不是数据类型的问题.另外,MyField在所有这些字段中都是CHAR(1).
I already checked and the DDL is the same for the 3 databases, so it's not a problem of data type. Also, MyField is a CHAR(1) in all of them.
有人可以帮助我吗?
推荐答案
解决了该问题!答案来自于这篇文章: http://objectmix.com/ado-dao-rdo-rds/392318-fixedwidechar-adodb-problem.html
Solved the problem! The answer came from this post: http://objectmix.com/ado-dao-rdo-rds/392318-fixedwidechar-adodb-problem.html
我不得不修复ADODB.pas中的一个错误,更改了以下行
I had to fix a bug in the ADODB.pas changing the following line
compatible:= FieldDef.DataType in [ftstring,ftwidestring]
进入
compatible:= FieldDef.DataType in [ftstring,ftwidestring,ftfixedWideChar]
这篇关于TADOQuery:字段"MyField"的"EDatabaseError类型不匹配,期望:实际的字符串:FixedWideChar"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!