[fpc-pascal] TSQLQuery doesn't work with a lookup field if it is a memo (text)

Luca Olivetti luca at ventoso.org
Fri Jan 13 16:54:57 CET 2023


Hello,

I just found out that if I try to create a lookup field that points to a 
memo field (in postgresql the field is defined as text), it bombs out 
with "list index (-2) out of tange" (or a similar message).
It seems it is because a TMemo lookup field is assigned -1 as its index.
TO solve the issue I just cast the field in the query to a varchar(100), 
but, FYT, TZQuery (zeos) has no problem with that (but in this project 
I'm using sqldb).

Bye
-- 
Luca



More information about the fpc-pascal mailing list