Query was empty. But i can´t find any query in the MyCommand
Code: Select all
MySQLModule->MyCommand->SQL->Clear();
MySQLModule->MyCommand->SQL->Assign("use tempDB");
MySQLModule->MyCommand->Execute(1);
Code: Select all
MySQLModule->MyCommand->SQL->Clear();
MySQLModule->MyCommand->SQL->Assign("use tempDB");
MySQLModule->MyCommand->Execute(1);
Anonymous wrote:When i am trying to execute a sql with MyCommand i get a error
Query was empty. But i can´t find any query in the MyCommand![]()
Code: Select all
MySQLModule->MyCommand->SQL->Clear(); MySQLModule->MyCommand->SQL->Assign("use tempDB;"); MySQLModule->MyCommand->Execute(1);
Code: Select all
AnsiString sqlStr = "CREATE database IF NOT EXISTS mandoMySQL;\n";
sqlStr += "USE mandoMySQL;";
MySQLModule->MyCommand->SQL->Clear();
MySQLModule->MyCommand->SQL->Text = sqlStr;
MySQLModule->MyCommand->Execute(1);
Code: Select all
AnsiString sqlStr1 = "CREATE database IF NOT EXISTS mandoMySQL;";
MySQLModule->MyCommand->SQL->Clear();
MySQLModule->MyCommand->SQL->Text = sqlStr1;
MySQLModule->MyCommand->Execute(1);
AnsiString sqlStr2 = "use mandoMySQL;";
MySQLModule->MyCommand->SQL->Clear();
MySQLModule->MyCommand->SQL->Text = sqlStr2;
MySQLModule->MyCommand->Execute(1);