Page 1 of 1

MyQuery1->SQL->Clear() - hangs

Posted: Thu 05 Jul 2007 18:44
by sandy771
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?

Posted: Fri 06 Jul 2007 07:35
by Antaeus
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(); 

Posted: Thu 19 Jul 2007 09:20
by sandy771
That worked - thanks.