Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problems connecting to oracle database

Problems connecting to oracle database

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    txikiting
    wrote on last edited by
    #1

    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 Last reply
    0
    • V Offline
      V Offline
      vsorokin
      wrote on last edited by
      #2

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

      --
      Vasiliy

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved