What Does (MEMO) mean ? lazarus / 16-Databases ---------------------------------------------------------------------- Weitentaaal · 2020-11-03 09:06 Hey Guys, another Question: if i use this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  Query.FieldByName('RandomField').text  then i get (MEMO)as result, but if i use this : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  Query.FieldByName('RandomField').AsString  then i get my Value i expectet so what is the difference at these two ? Thanks for help ---------------------------------------------------------------------- Weitentaaal · 2020-11-03 09:06 Database is SQLite btw ---------------------------------------------------------------------- Okoba · 2020-11-03 14:52 You probably did not make the field, so Query picked TMemoField for you. As a result, text property is the class description. AsString gets the content for you. BTW, You can make your fields with form editor of TSQLQuery. ---------------------------------------------------------------------- Weitentaaal · 2020-11-03 16:30 its bc the field in the db is Varchar ---------------------------------------------------------------------- egsuh · 2020-11-04 06:20 Where do you see (MEMO)? If it is in the DBGrid then it means the field is Memo type -- or BLOB type in case of Firebird.  Based on your explanation, Query.FieldByName('RandomField').text seems to typecast to memo type field. There is an option in DBGrid which shows the content of the memo field. I can't remember but it's not difficult to find. ---------------------------------------------------------------------- paweld · 2020-11-04 10:25 AsString - returns the field value exactly as it is in the database Text - returns the value of the field obtained after executing the GetText event ---------------------------------------------------------------------- marcov · 2020-11-04 14:57 I always add fields to the form, and then override the gettext, letting them all point to one method: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure Tdm_main.ZcontacttopcontactmomentGetText(Sender: TField;  var Text: string; DisplayText: Boolean);begin  if DisplayText then     Text := Copy(sender.AsString, 1, 100)  else     text:=sender.AsString;end;   IIRC there is a database and/or sqlite lemma in the wiki, with this an other small tips and tricks ---------------------------------------------------------------------- Slyde · 2020-11-16 18:42 If you're using a TDBGrid, you can easily fix this from the Properties Manager. 1) Click the grid 2) Expand Options in the Prop Mgr 3) Set dbDisplayMemoText to True Problem solved. ---------------------------------------------------------------------- Weitentaaal · 2020-11-17 13:52 Thank You Guys problem Solved and Learned A lot