Important: Please read the Qt Code of Conduct -

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");
    if (! {
    QMessageBox::critical(0, QObject::tr("Database Error"),

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

    Thank you!!

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

Log in to reply