Problems with field name that contain accented characters

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
User avatar
tkszeos
Junior Boarder
Junior Boarder
Posts: 35
Joined: 26.08.2005, 21:45

Problems with field name that contain accented characters

Post by tkszeos »

Hello,
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;
but I get the following error:
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;
I get the following other error:
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
the field is updated correctly.

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
Post Reply