Recent

Author Topic: AsString and AsWideString only returns 255-Bytes  (Read 3960 times)

QEnnay

  • Full Member
  • ***
  • Posts: 129
Re: AsString and AsWideString only returns 255-Bytes
« Reply #15 on: May 11, 2020, 05:15:31 pm »
Please how do you have defined SQL table, from where you read string data?
Column must be defined as VARCHAR with given maximum size. For example:
VARCHAR(8000); // here is limit 32767
If you need larger varchar data you must use TEXT -> MEMO

Thanks for the reply, but I mentioned above that I had tried adding the length designation to VARCHAR and it made no difference. I tried VARCHAR(2000), VARCHAR(32000), VARCHAR(max_int) and still got 255. Pretty sure you will find it is an FPC/Laz Unit Definition issue.

Defining it as TEXT will display "(MEMO)" in all the data-aware db-fields other than a Memo. A bit useless.

The link in my previous post was to the SQLIte3 website and they say there is no limit for VARCHAR as it is treated as TEXT internally with unlimited length.
Linux-Mint 20.1 x64 + Cinnamon; Lenovo Flex 5 Ryzen 5 4500, 16GB memory
FPC: 3.2.0-1, Lazarus 2.0.12-0, all 64bit

LacaK

  • Hero Member
  • *****
  • Posts: 698
Re: AsString and AsWideString only returns 255-Bytes
« Reply #16 on: May 12, 2020, 10:04:32 am »
Thanks for the reply, but I mentioned above that I had tried adding the length designation to VARCHAR and it made no difference. I tried VARCHAR(2000), VARCHAR(32000), VARCHAR(max_int) and still got 255. Pretty sure you will find it is an FPC/Laz Unit Definition issue.
I can not believe this, because there are tests against SQLite which works with VARCHAR fields with size > 255
So problem must be somewhere else. Can you again ZIP here your database and test program ...

Defining it as TEXT will display "(MEMO)" in all the data-aware db-fields other than a Memo. A bit useless.
Yes

The link in my previous post was to the SQLIte3 website and they say there is no limit for VARCHAR as it is treated as TEXT internally with unlimited length.
Yes, true

 

TinyPortal © 2005-2018