Quote Originally Posted by Santosh Reddy View Post
What is creeConnexion()?
It's a function to test the connexion on database

her is the function

Qt Code:
  1. static bool creeConnexion()
  2. {
  3. db = new QSqlDatabase;
  4. *db = QSqlDatabase::addDatabase("QSQLITE") ;
  5. db->setHostName("localhost");
  6. db->setDatabaseName("gestionstockDB.db");
  7. db->setPassword("");
  8. db->setUserName("");
  9. // Verifier l'ouverture de la base de donn�
  10. if(!db->open())
  11. {
  12. return false;
  13. }
  14. return true;
  15. }
To copy to clipboard, switch view to plain text mode