[BCB / MySQL] Temporary tables
Posted: 14.01.2011, 09:38
i am trying to upgrade from an old Zeos-version (6.1.5-stable) to version 6.6.6-stable and at the same time upgrade MySQL version 4.0 (!!!) to version 5. Doing that for Borland C++ Builder 6, it is not going smooth, but I managed to get it installed. However, I am having a problem with the following piece of code, which worked fine in version 6.1.5-stable:
as said, this code always working in version 6.1.5-stable, but now i get the error: 'SQL Error: Table 'temp' doesn't exist'.
When I perform both queries in MySQL workbench, it works fine, so I have the feeling that it has something to with a setting of one of the zeos-objects, but i am not sure.
I checked the processlist in MySQL en saw that both the ZSQLProcessor1 and ZQuery1 object use the same MySQL connection, so that should not be the problem.
Any ideas? thanks !
Code: Select all
AnsiString SQLstring;
SQLstring = "CREATE TEMPORARY TABLE temp SELECT * FROM mytable";
ZSQLProcessor1->Script->Text = SQLstring;
ZSQLProcessor1->Execute();
ZQuery1->Active = false;
ZQuery1->SQL->Add("SELECT * FROM temp");
ZQuery1->Active = true;
When I perform both queries in MySQL workbench, it works fine, so I have the feeling that it has something to with a setting of one of the zeos-objects, but i am not sure.
I checked the processlist in MySQL en saw that both the ZSQLProcessor1 and ZQuery1 object use the same MySQL connection, so that should not be the problem.
Any ideas? thanks !