1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| int DataLinkToBastaMgr::MakeList()
{
//<CONNEXION A LA BDD>
this->db = QSqlDatabase::addDatabase("QODBC", "cnx-" + this->DSN + "//" + this->Collector + "//" + this->CollectorTable);
this->db.setDatabaseName(this->DSN);
this->db.setHostName(this->Host);
this->db.setUserName(this->Login);
this->db.setPassword(this->Pass);
this->err.setDriverText(this->db.driverName());
this->err.setDatabaseText(this->db.databaseName());
this->err.setType(QSqlError::NoError);
this->err.setNumber(-1);
if (!this->db.open())
{
this->LogFile->Append("DataLinkToBastaMgr::Proceed: Cannot open database " + this->db.connectionName());
if (this->err.isValid())
{
this->LogFile->Append(this->err.text());
return 1;
}
}
else
{
this->LogFile->Append("DataLinkToBastaMgr::Proceed: The connection " + this->db.connectionName() + " has been opened");
}
//</CONNEXION A LA BDD>
//<RECUPERATION DE LA LISTE DES POINTS> |
Partager