tfmtmemofield incompatible
Posted: Fri 02 Sep 2011 15:23
Having two queries over the same table, in order to copy record from one to the other.
If I have a Tfmtmemofield, an exception is raised when I try to assign it to its correspondent target field:
Query1.sql.text:='Select * from tableA where proposta=1';
Query2.sql.text:='Select * from tableA';
pp:=2;
ano:=2011;
Query1.first;
while not Query1.eof do
begin
Query2.insert;
for m:=0 to Query2.FieldCount-1 do Query2.Fields[m].Assign(Query1.fieldbyname(Query2.fields[m].fieldname));
Query2Proposta.asinteger:=pp;
Query2ano.asinteger:=a;
Query2Aprovado.AsBoolean:=false;
Query2.post; raises : Invalid character value for cast specification Parameter[35] :[Texto] - invalid Value (Status = 2h).
Query3.next;
end;
Query1.next;
end;
The content of the field "texto" is a richtext produced by a standard trichmemo delphi component.
This works fine under Sdac.
Could this be an incompatibility between Query parameter and Latin1 charset?
If I have a Tfmtmemofield, an exception is raised when I try to assign it to its correspondent target field:
Query1.sql.text:='Select * from tableA where proposta=1';
Query2.sql.text:='Select * from tableA';
pp:=2;
ano:=2011;
Query1.first;
while not Query1.eof do
begin
Query2.insert;
for m:=0 to Query2.FieldCount-1 do Query2.Fields[m].Assign(Query1.fieldbyname(Query2.fields[m].fieldname));
Query2Proposta.asinteger:=pp;
Query2ano.asinteger:=a;
Query2Aprovado.AsBoolean:=false;
Query2.post; raises : Invalid character value for cast specification Parameter[35] :[Texto] - invalid Value (Status = 2h).
Query3.next;
end;
Query1.next;
end;
The content of the field "texto" is a richtext produced by a standard trichmemo delphi component.
This works fine under Sdac.
Could this be an incompatibility between Query parameter and Latin1 charset?