Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6849287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:58:21+00:00 2026-05-27T00:58:21+00:00

I created a Windows Qt C++ application that performs some SQL queries. This application

  • 0

I created a Windows Qt C++ application that performs some SQL queries. This application compiled and runs correctly on my development machine.

I have these directories in my PATH environment variable:

C:\oracle\product\10.2.0\db_1\bin
C:\instantclient_11_2
C:\QtSDK\mingw\bin
C:\Qt\4.7.4\bin

I would like to distribute my application as a standalone to other computers so I have included these .dll files with the distribution:

QtCore4.dll
QtGui4.dll
QtSql4.dll
qsqloci4.dll
mingwm10.dll
libgcc_s_dw2-1.dll

This is how my QSqlDatabase is setup in my code:

    QSqlDatabase db = QSqlDatabase::addDatabase("QOCI");
    db.setHostName(hostname);
    db.setPort(port);
    db.setDatabaseName(sid);
    db.setUserName(username);
    db.setPassword(password);
    bool ok = db.open();
    if (ok) {
        //stuff
    } else {
        QString dbErr = db.lastError().databaseText();
        QString drErr = db.lastError().driverText();
        return this->messageBox("SQL Query Failed:\n" + dbErr + "\n" + drErr);
    }

When I run this application on a computer that is not my development machine, dbErr and drErr are set to “Driver not loaded”. What other .dll files do I need in order to get this to run correctly?

Edit:

Do I need oci.dll from C:\oracle\product\10.2.0\db_1\bin?
What about oci.dll from C:\instantclient_11_2?

I tried adding both of those files to my executable’s directory, but I still get the same error. Do I need both of those .dll files somehow?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:58:21+00:00Added an answer on May 27, 2026 at 12:58 am

    You need to create a folder call sqldrivers in the directory containing your exe. Put all the SQL driver DLLs you are using in there (qsqloci4.dll).

    See How to Create Qt Plugins – Locating Plugins for more information on using Qt plugins and how Qt finds them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a Windows Forms application in .NET 2 using C# that runs
With some slower machines that our application runs on (which is in the windows
I've created a web application that I've hosted with IIS 7 on a Windows
Today we have a windows application that, using an OCX, creates a web page
I have a requirement to create a simple windows forms application that allows an
I have created a VB.Net lending application for a cooperative that caters to widows.
hello i have created one windows application in c# .net and its working fine
We have an application that performs auto-updates. Until recently, we haven't run into any
I have a .NET Wndows application in C#. It's a simple Windows application that
I have an ASP.NET application that authenticates users using Ldap against active directory. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.