TADOQuery: 'EDatabaseError type mismatch for field 'MyField', expecting: String actual: FixedWideChar' [closed]

狂风中的少年 提交于 2019-12-11 03:43:47

问题


I have 3 different databases (development, homolog and prod), each of them in one of the following Oracle versions: 11g and 10g.

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:

'EDatabaseError type mismatch for field 'MyField', expecting: String actual: FixedWideChar'

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.

Can anybody help me?


回答1:


Solved the problem! The answer came from this post: http://objectmix.com/ado-dao-rdo-rds/392318-fixedwidechar-adodb-problem.html

I had to fix a bug in the ADODB.pas changing the following line

compatible:= FieldDef.DataType in [ftstring,ftwidestring]

into

compatible:= FieldDef.DataType in [ftstring,ftwidestring,ftfixedWideChar]


来源:https://stackoverflow.com/questions/16658985/tadoquery-edatabaseerror-type-mismatch-for-field-myfield-expecting-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!