MyQuery1->SQL->Clear() - hangs

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

MyQuery1->SQL->Clear() - hangs

Post by sandy771 » Thu 05 Jul 2007 18:44

Using MySQL mydac standard v 5.00.1.7 with Builder 2006

I load about 3 Million records into using

MyCommand1->SQL->Clear();
MyCommand1->SQL->Add("LOAD DATA LOCAL INFILE 'source.dat' INTO TABLE " + FULLTABNAME);
MyCommand1->Execute();

In reponse toa column click I then try to run the following three line sof code

MyQuery1->SQL->Clear();
MyQuery1->SQL->Add("SELECT * FROM " + FULLTABNAME + SortOrder);
MyQuery1->Execute();

My application hangs at the first line, i.e. MyQuery1->SQL->Clear();

Any ideas?

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

Post by Antaeus » Fri 06 Jul 2007 07:35

Do you use FetchAll=False mode?
Add to your code the Close command before clearing the SQL property, and check what command will lead to hanging. You code should look like this:

Code: Select all

MyQuery1->Close(); 
MyQuery1->SQL->Clear(); 
MyQuery1->SQL->Add("SELECT * FROM " + FULLTABNAME + SortOrder); 
MyQuery1->Execute(); 

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Post by sandy771 » Thu 19 Jul 2007 09:20

That worked - thanks.

Post Reply