I have a problem and I hope I can explain myself.
In an old Firebird 1.5 database I have a field whose name is "Città".
By connecting TZQuery via a TDataSource to a DBGrid I see the field value correctly. The field name is seen as "Citt"
I create a TZQuery.BeforePost event
Code: Select all
procedures TForm1.ZQuery1BeforePost (DataSet: TDataSet);
begin
ZQuery1.FieldByName ('Citt'). Value: = 'Rome';
end;
SQL Error: Dynamic SQL Error; SQL error code = -206; Column unknown; Citt; At line 1, column 15..
If instead I use the following code:
Code: Select all
procedures TForm1.ZQuery1BeforePost (DataSet: TDataSet);
begin
ZQuery1.FieldByName ('Città'). Value: = 'Rome';
end;
TZQuery1: Field not found: "Città"
If TZConection.ClientCodePage = NONE and TZQuery is connected to a TUpdateSQL and the property ModifySQL is set to
Code: Select all
UPDATE "BOLHDR" SET
"Città" = :"Citt"
WHERE
"BOLHDR"."ID_BOL" = :OLD_ID_BOL
I'm wrong, is it a bug or a correct behavior?
The problem is present both in Delphi 7 and Lazarus
Thanks for the reply