Dňa 1.12.2016 o 21:40 Martin Collins via Lazarus napísal(a):
On 01/12/16 16:15, Martin Collins via Lazarus wrote:
 From what I understand, SQLite TEXT type has no set length so db aware
components treat it as a memo. Therefore when I assign a TEXT field to a
db aware component, all that appears in the component is "(MEMO)", even
though most of my TEXT fields are only up to 10-30 characters long.
Solutions offered on-line suggest using a dbmemo (which I have for my
longer TEXT fields as that's what I want), but I need to use dbgrids,
dbedits, dbcomboboxs, etc for the shorter TEXT fields.

I have found a solution to my problem, with thanks to the following link:


The answer was altering my SQL Query text, from something like this:


to this:

   CAST( "Filename" AS VARCHAR) AS "Filename",

Casting it as a different type in the SQL statement worked!
You are not required to that if you have declared table "mytable" as:
CREATE TABLE "mytable" (
 FileName varchar(100),
 Date datetime

Lazarus mailing list

Reply via email to