Type do not match to field expected: String actual: Memo
Posted: Thu 02 Dec 2010 17:31
When I execute the following SQL from my software (Delphi):
The system displays the error message
raised exception class EDatabaseError with message 'Query: Type do not match to field 'check', expected: String actual: Memo'.
In form has 3 fields:
ID: TIntegerField
name: TStringField
check: TStringField <--- here the problem, expected TMemoField
To resolve I changed the code:
The problem: this code occurs in many places in my source code.
Is there a way to configure the Devart (a param) to not show this exception and accept fields of type "text" as a string field?
Before I used the dbExpress component Vitavoom, and never received this error ...
Code: Select all
select id, name
(select 'Y' from other_table where id = 1) as check
from table_name
raised exception class EDatabaseError with message 'Query: Type do not match to field 'check', expected: String actual: Memo'.
In form has 3 fields:
ID: TIntegerField
name: TStringField
check: TStringField <--- here the problem, expected TMemoField
To resolve I changed the code:
Code: Select all
select id, name
cast((select 'Y' from other_table where id = 1) as varchar(1)) as check
from table_name
Is there a way to configure the Devart (a param) to not show this exception and accept fields of type "text" as a string field?
Before I used the dbExpress component Vitavoom, and never received this error ...