[SOLVED]Foreign key in DBgrid shows as (MEMO) lazarus / 16-Databases ---------------------------------------------------------------------- Ianspeed · 2016-09-16 08:34 Hi All, sorry if I posted this in the wrong section or something else, my first post! Coming back  in to programming from a long break from Delphi! Really impressed with Lazarus! Here's my problem. Have a table with an associated table connected with a foreign key. This just holds the card type (PG5x7, LG5x7, DL and PDL) this associated file is for a lookup on the card type. This works in SQLite Studio but doesn't work in my test project or the Lazarus desktop database, my thoughts are I have set something up wrong in the database, as surely the DBGrid should just see the associated link to card type and create a lookup field? Or maybe I'm wrong and have to code for it? I have scoured the web of all knowledge(think it ran dry with this one!), but there doesn't seem to be a direct answer or problem like this, so I guess it's something simple I'm missing! ---------------------------------------------------------------------- vdubeau · 2016-09-17 20:18 I'm pretty new to Lazarus myself but I have run across this. You probably have the field defined as TEXT. DBGrid seems to interpret this as a memo field and can't display it. Change the field type to VARCHAR (I know they are really the same to SQLIte) and DBGrid should display it correctly. ---------------------------------------------------------------------- Ianspeed · 2016-09-19 08:46 Thanks vdubeau, This now shows the data in the DBGrid, but unfortunately still won't give me a drop down selection, does this have to be coded manually? Thanks