I am using QT commercial edition and i installed my OCI driver to access ORACLE db.
Qt Code:
  1. static int cCount = 0;
  2.  
  3.  
  4. QSqlError err;
  5. QSqlDatabase db = QSqlDatabase::addDatabase(driver, QString("Connection%1").arg(++cCount));
  6. //db.setDatabaseName(dbName);
  7. db.setHostName(host);
  8. db.setPort(port);
  9. if (!db.open(user, passwd)) {
  10. err = db.lastError();
  11. db = QSqlDatabase();
  12. QSqlDatabase::removeDatabase(QString("Connection%1").arg(cCount));
  13. }
  14. else{
  15. conName.append(QString::number(cCount,10));
  16. QSqlQuery query;
  17. query.prepare("INSERT INTO person (id, forename, surname) "
  18. "VALUES (:id, :forename, :surname)");
  19. query.bindValue(":id", 10);
  20. query.bindValue(":forename", "Bart");
  21. query.bindValue(":surname", "Simpson");
  22. if(!query.exec())//;
  23. {
  24. QSqlError err1=query.lastError();
  25. QMessageBox::information(this,"Hi",err1.text());
  26. }
To copy to clipboard, switch view to plain text mode 
This is the method am using to create connection with my Db and immediately executing the sql query.Using above method i am able to connect with oracle Db with OCI driver and while executing sql query i am receiving error,which states that "Driver not loaded Driver not loaded".

what is the problem? can any one help me....

thanks