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

2023-01-13 Thread Luca Olivetti via fpc-pascal

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

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


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

2023-01-13 Thread Luca Olivetti via fpc-pascal

El 13/1/23 a les 16:54, Luca Olivetti via fpc-pascal ha escrit:

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).


That was meant to be "FYI" :-/

Bye
--
Luca

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal