Page 1 of 1

Widememo in dbEdit Delphi XE2, SQLite3

Posted: 21.09.2012, 12:34
by PetrHL
Hello,

I just downloaded from SVN (trunk) and installed zeos db components to Deplhi XE2. It works but all fields defined as TEXT in sqlite database has in dbeEdit fields "widememo" text and not the correct value. Anyone knows what could be wrong, please?

Thank you!

Petr

Posted: 21.09.2012, 13:53
by EgonHugeist
PetrHL,

that's why TEXT means unlimited size. We can't determine a FieldBufferSize for TEXT in this case. So we load TEST as StringStream. This is a proplem of the lazy SQLite affinity:
http://www.sqlite.org/datatype3.html

The DataSets of Delphi/FPC need a fixed Buffersize for StringFields. But which size is correct for TEXT?

Simply declare the stringfields a VARCHAR(100) and you will have TWideString Fields instead... Just have a look to this link.

Posted: 21.09.2012, 14:03
by miab3
EgonHugeist,

I wonder if it would be a big problem to add in Properties for SQLite something like that?
TextAsVarchar = 20

And it only readonly mode (not to lose data).

Michal

Posted: 21.09.2012, 15:31
by EgonHugeist
miab3,

hm nope, that's a small patch. It would only work in the TZConnection.Properties. But how do you want to mange WANTED TEXT(memo) fields if such an option is available?