Page 1 of 1

Inserting Text data type with TMyQuery

Posted: Sat 13 Apr 2019 19:00
by alphawiz1
I'm working on a Delphi project where I need to insert text from a TMemo component and need to insert it into a table with a Text data type using TMyQuery.

I'm inserting a few other fields at the same time (strings) using ParamByName('name').AsString
Is there a similar way to insert the multiple strings in the TMemo.Lines property?

If I need to save the text to a temp file and then load it in somehow, that's fine. But I need a little bit of guidance on how to best do it since the documentation for MyDAC has few, if any, examples for using TMyQuery. (If there are examples somewhere, please let me know where they are...I've basically been having to learn to use MyDAC on my own, bit by bit.)

Thanks

Re: Inserting Text data type with TMyQuery

Posted: Thu 18 Apr 2019 05:00
by ViktorV
To solve the issue, you can use next code:

Code: Select all

  query.ParamByName('report').AsString := myreport.Lines.Text;