SQLite - DBGrid - text field is memo lazarus / 31-LCL ---------------------------------------------------------------------- Milsa · 2013-09-24 13:51 I connected to SQLite database and set SQLQuery. Output is in DBGrid. Text field I see as "(Memo)". This isn't for Lazarus, because I can't define events for GetText in IDE (fields haven't events): http://stackoverflow.com/questions/4809298/lazarus-dbgrid-showing- memo-as-the-value-of-string-fields-in-sqlite-3 This tutorial is not about reality (memo problem isn't there ): http://alevel-computing.x10.mx/mw/index.php/Tutorial_DBGrid How can I fix this problem? I want to see text from database. ---------------------------------------------------------------------- BigChimp · 2013-09-24 14:04 Answered already on the forum and the wiki page on grids... ---------------------------------------------------------------------- Milsa · 2013-09-24 14:47 Thank you very much. I searched with Google and I found wiki grid reference page but it didn't help me. After your reply I found with search on this forum this thread http://forum.lazarus.freepascal.org/index.php /topic,19339.msg110012.html#msg110012 with solution. Then I found it in grid reference page. Please add information about SQLite and memo to this wiki page for Google and add GetText procedure (solution is not complete on wiki page). ---------------------------------------------------------------------- BigChimp · 2013-09-24 14:55 If you miss info on the wiki, you're welcome to add it. ---------------------------------------------------------------------- ddimov007 · 2017-03-08 11:13 Old thread, however, it might be helpful to elaborate on the discussion above. The link in question above that can help fight the issue of having no GetText event on DBGrid is: http://forum.lazarus.freepascal.org/index.php/topic,19339.msg110012.ht ml#msg110012 It works! ---------------------------------------------------------------------- Hemptwister · 2023-03-23 21:15 DBGrid now has an option to display memo as text.   DisplayMemoText It uses this code:     if CheckDisplayMemo(aField) then         Result := aField.AsString Btw, the CAST(field as varchar) in your query no longer works. Nor changing the field type in the DB. SQLite is happy to put pretty much any field type in its SQL statements. But it treats them all like memo fields.