0

Got a cxmemo1 that I need to add its contents to database. Right now all I add is the first line:

ABSQuery1.Params.ParamByName('A2').VALUE := CXMEMO1.text;

I know I need to modify this line but how ? I want all lines in the memo to be entered.

TLama
  • 75,147
  • 17
  • 214
  • 392
user763539
  • 3,509
  • 6
  • 44
  • 103

1 Answers1

2

There is nothing in that code that should be preventing multiple lines from being posted to the DB. So either the cxMemo.Text property is not returning all of the text in the first place, or the DB is truncating the field text on the first line break.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • unfortunately it functions that way ... :( maybe cxmemo.lines.add might do the trick ? – user763539 Jul 23 '12 at 23:31
  • what is strange is that the text actually get written in the database (its MEMO type). However the cx grid is showing me only the first line.If I make its property a blobedit (blomeditkind=memo) then there's no problem. But I need to see the contents. – user763539 Jul 23 '12 at 23:55
  • 2
    Then the problem is with the `cxGrid`, not the `cxMemo` or the DB. My guess (I have never used cxGrid) is that there is a property you can set to see the extra lines. Maybe the `OptionsView.CellAutoHeight` property? – Remy Lebeau Jul 24 '12 at 00:08