DBGrid show (MEMO) result for all string fields for sqlite3 lazarus / 16-Databases ---------------------------------------------------------------------- Goodman H__ · 2010-05-19 03:57 Greetings to everybody! I am too late to found Fp+Lazarus,wow,great!! I like Delphi but regret for her windows only and not open source.I am waiting for her cross platform version  but...not yet.Finally I came across FP+Lazarus,yes,yes! OK,here is my problem,I test the sqlite3 components,pretty easy,pretty good,except one thing,DBGrid shows (MEMO) result for all string fields,other number fields show correct. So what's the problem?OS:winXP sp3 Chinese,the latest Lazarus. Thanks for your help in advance. Regards, Sam ---------------------------------------------------------------------- cpalx · 2010-05-19 13:11 i dont use SQLite, but in PostgreSQL you can cast your field cast(field as varchar) ---------------------------------------------------------------------- Goodman H__ · 2010-05-19 20:35 Quote from: cpalx on May 19, 2010, 03:11:16 pmi dont use SQLite, but in PostgreSQL you can cast your field cast(field as varchar) Thank you. But where do I do the cast?In the SQLquery control,I set sql string to 'select * from city'.My city table contains ID,name,location,population etc.ID and population is in integer type while name and location is in string(varchar?)type.Now what exactly am I supposed to do? Regards, Sam ---------------------------------------------------------------------- garlar27 · 2010-05-20 10:21 Please, can you post the Table's DDL to see the field types you're using? ---------------------------------------------------------------------- Goodman H__ · 2010-05-20 22:32 Quote from: garlar27 on May 20, 2010, 12:21:37 pmPlease, can you post the Table's DDL to see the field types you're using? Here they are: Code: [Select]CREATE TABLE Country (   Code TEXT PRIMARY KEY NOT NULL,   Name TEXT NOT NULL,   IndepYear INTEGER,   Population INTEGER NOT NULL,   LifeExpectancy REAL,   GovernmentForm TEXT NOT NULL,   ); All fields in TEXT type show result (MEMO). Thanks a lot for your time. ---------------------------------------------------------------------- Goodman H__ · 2010-05-22 04:53 Just found that if the field type changes from Text to char(number),all works perfact.