Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2023-01

TSQLQuery doesn't work with a lookup field if it is a memo (text)

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

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

Reply by email

Luca Olivetti
to Luca Olivetti

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

Reply by email