Konsole && MySQL



  • void __fastcall mysql::mysql (TForm *form, AnsiString driver, ...)
     {
              this->connection = new TSQLConnection(form);
              this->connection->DriverName = driver;
              this->connection->Params->Values["DriverName"] = driver;
              this->connection->Params->Values["User_Name"] = user;
              this->connection->Params->Values["Password"] = pwd;
              this->connection->Params->Values["HostName"] = hostname;
              this->connection->Params->Values["Database"] = database;
              this->connection->LibraryName = "dbexpmysql.dll";
              this->connection->VendorLib = "libmySQL.dll";
              this->connection->KeepConnection = true;
              this->connection->GetDriverFunc = "getSQLDriverMYSQL";
              this->connection->Open(); //HIER
              this->dataset = new TSQLDataSet(form);
    //und so weiter...
     }
    

    das ist mein Konstruktor der MySQL-Klasse... Es ging die ganze Zeit - aber jetzt, wo ich die GUI nicht mehr brauche und das Projekt einfach zur Konsolenanwendung deklassiert habe, will es nicht mehr...
    Die Klasse an sich initialisiere ich so:

    MySQL = new mysql (NULL, "asd", "asd", ...);
    

    und es läuft alles richtig ab - bis zu dem Zeitpunkt, wo er die Verbindung öffnet... ("//HIER")
    Dort bleibt er einfach stehen und ich weiß nicht, was er dann die ganze Zeit macht...
    Was hab ich falsch gemacht?

    Danke schon mal...
    Tom


Anmelden zum Antworten