SQLite - VarChar field bug in Delphi XE5 32 bit
Posted: 18.01.2014, 13:49
Hello,
I have installed the latest snapshot (3070) on my RAD Studio XE5 Ultimate Update 2. I have only checked the 32 bit version so far as I have stuff to port over from Delphi 2010.
I need to connect my software (also) to SQLite. I got the latest DLL version, downloaded 1 week ago from the official website.
The issue is this: in Delphi 2010, ZEOS 7.1.2 appropriately recognizes VARCHAR fields as string fields, grids appropriately show those fields contents and so on.
In Delphi XE5 + this snapshot ZEOS they get recognized as memo, don't show in TEdits nor TDBGrids.
I have attached a screenshot visually showing the issue: on the top of the form I have put ZEOS components displaying a small table contents in a TEdit and TDBGrid.
At the bottom, the same database but connected by using the FireDAC components provided by default in RAD Studio XE5. You can see how with everything equal, FireDAC show the right contents while ZEOS show the data as memo. The property editor in the screenshot shows how ZEOS recognizes the VARCHAR field in question.
In the same screenshot you may also see how a CHAR(2) field gets appropriately rendered instead.
I have an explanation for this erroneous behaviour (could be wrong!): in SQLite you can declare CHAR, VARCHAR(N) and VARCHAR fields. The latter does not provide a maximum length but has still to be considered as string, not as TEXT / memo!
I have installed the latest snapshot (3070) on my RAD Studio XE5 Ultimate Update 2. I have only checked the 32 bit version so far as I have stuff to port over from Delphi 2010.
I need to connect my software (also) to SQLite. I got the latest DLL version, downloaded 1 week ago from the official website.
The issue is this: in Delphi 2010, ZEOS 7.1.2 appropriately recognizes VARCHAR fields as string fields, grids appropriately show those fields contents and so on.
In Delphi XE5 + this snapshot ZEOS they get recognized as memo, don't show in TEdits nor TDBGrids.
I have attached a screenshot visually showing the issue: on the top of the form I have put ZEOS components displaying a small table contents in a TEdit and TDBGrid.
At the bottom, the same database but connected by using the FireDAC components provided by default in RAD Studio XE5. You can see how with everything equal, FireDAC show the right contents while ZEOS show the data as memo. The property editor in the screenshot shows how ZEOS recognizes the VARCHAR field in question.
In the same screenshot you may also see how a CHAR(2) field gets appropriately rendered instead.
I have an explanation for this erroneous behaviour (could be wrong!): in SQLite you can declare CHAR, VARCHAR(N) and VARCHAR fields. The latter does not provide a maximum length but has still to be considered as string, not as TEXT / memo!