Link to home
Start Free TrialLog in
Avatar of Claryan
ClaryanFlag for Norway

asked on

Delphi ADO - DB2, Old Delphi 7 code. Type mismatch for field. Expecting String actual: FixedWidechar

We have Ado against DB2 base via TSQLConnection. Data are stored TADOTable's. If we map new fields, they are stored in datamodule as TStringField (if char in Db2). If I who has Delphi 2006 installed run the application. It works fine.
If a user run the application. She get the error: ADOTABLE...:Type mismach for field 'xxx', expecting: String actual:fixedwidechar.
There are no code before insert in adotable and no code.
Avatar of 2266180
2266180
Flag of United States of America image

it seems that the solution would be to change the adodb.pas
compatible:= FieldDef.DataType in [ftstring,ftwidestring]
to
compatible:= FieldDef.DataType in [ftstring,ftwidestring,ftfixedWideChar]

Avatar of Claryan

ASKER

thanks.
But is it posible to overload this class. and thus not make any changes to default Delphi.
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Claryan

ASKER

Thank you very, very much. Used alternative 2.
Avatar of Claryan

ASKER

This was very good!!