July 31, 2010

txikiting txikiting
Lab Rat
1 posts

Problems connecting to oracle database

 

Hi all,
I’m creating a simple program to connect to oracle and execute a query, but I have this error:

/usr/include/qt4/QtSql/qsql_oci.h:47: error: QtSql/private/qsqlcachedresult_p.h: No such file or directory

Please, can I help me?

This is my code:

void MainWindow::on_pushButton_clicked(){ ui->lineEdit->setText(“CONNECTING TO ORACLE…”); QSqlDatabase db = QSqlDatabase::addDatabase(“sgbdr”); db.setHostName(“casa”); db.setDatabaseName(“forestalmarti”); db.setUserName(“USER”); db.setPassword(“PASSW”); if (!db.open()) { QMessageBox::critical(0, QObject::tr(“Database Error”), db.lastError().text()); }
}

I’m developing with Qt 4.6.2, on Ubuntu 10.04 LTS.

Thank you!!

1 reply

August 1, 2010

Vass Vass
Hobby Entomologist
738 posts

I think, no OCI drivers enough in your Qt-build. You must download Qt-source and build it with needed driver.

 Signature 


Vasiliy

 
  ‹‹ Possible approach for SVG clipping      Cannot run qt designer, assistant, ect. ››

You must log in to post a reply. Not a member yet? Register here!