TMyDump->BackupQuery() line returns in commands

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ashlar64
Posts: 75
Joined: Thu 04 May 2006 18:56

TMyDump->BackupQuery() line returns in commands

Post by ashlar64 » Wed 30 Aug 2006 14:23

Hello,

I am using TMyDump->BackupQuery(). It is doing almost what I need it to do. The only problem is it is placing line returns \r\n within individual SQL commands. Placing them at the end of a command is fine (and something I want)...but when those characters are placed inside a SQL command it causes havoc. It would be very difficult to remove those since one of the fields is a text field and the text can contain many line returns.

So is there a way to turn off putting these characters inside a command string?

---Dave

ashlar64
Posts: 75
Joined: Thu 04 May 2006 18:56

Post by ashlar64 » Wed 30 Aug 2006 19:52

I noticed if I do this command....

MyDump1->BackupQuery("SELECT * FROM _Utility_Versions WHERE Utility_Version_ID = 7");

It should only make 1 insert command....basically for record that equals 7? Is this correct? Because this table has 10 entries and it makes 10 insert commands in the string it passes back as of the WHERE cause is totally ignored.

ashlar64
Posts: 75
Joined: Thu 04 May 2006 18:56

Post by ashlar64 » Wed 30 Aug 2006 20:04

ugh disregard my second message....I erred.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 31 Aug 2006 07:11

Try to set UseExtSyntax option to False. This will help to prevent dividing INSERT statements by several lines.

Post Reply