Results 1 to 3 of 3

Thread: ODBC Oracle. Unable to connect to database

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question ODBC Oracle. Unable to connect to database

    Using Qt 4.4.3, Mingw, Windows XP, Oracle 9.2

    QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
    db.setDatabaseName("DataSourceName");
    db.setUserName("username");
    db.setPassword("password");

    db.open gives error message:
    [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed QODBC3: Unable to connect

    When I misspell "DataSourceName", I get the error ..... Data source name not found ....., so that name is obviously working.
    Testing the connection in "Microsoft ODBC Adminstrator" works ok.
    Empty username and password makes no difference.

    Trace file from ODBC Adminstrator attached. (trace.txt)

    (Until now we have used a Delphi program with Borland BDE, but are migrating to Qt4 and C++.)
    Attached Files Attached Files

Similar Threads

  1. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  2. Fun with ODBC and Oracle
    By KaptainKarl in forum Installation and Deployment
    Replies: 4
    Last Post: 27th July 2007, 21:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.