Inserting Text data type with TMyQuery

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alphawiz1
Posts: 2
Joined: Sat 13 Apr 2019 18:50

Inserting Text data type with TMyQuery

Post by alphawiz1 » Sat 13 Apr 2019 19:00

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Inserting Text data type with TMyQuery

Post by ViktorV » Thu 18 Apr 2019 05:00

To solve the issue, you can use next code:

Code: Select all

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

Post Reply