Results 1 to 3 of 3

Thread: Connecting to Oracle from QT App

  1. #1
    Join Date
    Feb 2006
    Location
    Jarrell, Texas, USA
    Posts
    70
    Thanks
    7
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Connecting to Oracle from QT App

    I'm using QT4.3.1 on a Suse Enterprise Desktop 10.2 system.
    I am attempting to connect to a remote Oracle 9 database on a Solaris system.
    I have installed the Oracle 9 client on the Suse system. I can connect to the database on the Solaris system using the following sqlplus connection string:

    ./sqlplus firms/hn255pfp@tuts

    I attempted to connect to the same database using the sqlbrowser demo in QT. I select the QOCI driver, enter the same information as above and I get the following:

    An error occured while opening the connection: ORA-12154: TNS:could not resolve the connect identifier specified
    QOCI: Unable to logon

    Clearly I am ignorantly missing something. I would appreciate any help available.

    Thanks,
    Karl

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Connecting to Oracle from QT App

    That connection string consists of three fields (userid/password@db). You have to input each of them in corresponding line edit in sqlbrowser's Connect... dialog.

    PS. For security reasons you should never disclose your user names and passwords, even if they're only for "test" accounts.

  3. #3
    Join Date
    Oct 2006
    Posts
    42
    Thanks
    1
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Connecting to Oracle from QT App

    Is the tnsnames.ora file set up correctly?

    http://www.oracle-base.com/articles/...n.php#TNSNames

Similar Threads

  1. Building for Oracle
    By KaptainKarl in forum Installation and Deployment
    Replies: 2
    Last Post: 16th August 2007, 00:50
  2. QSqlQuery always return junk value while for varchar oracle.
    By ranjit2709 in forum Qt Programming
    Replies: 3
    Last Post: 7th August 2007, 05:19
  3. Fun with ODBC and Oracle
    By KaptainKarl in forum Installation and Deployment
    Replies: 4
    Last Post: 27th July 2007, 21:42
  4. Oracle 8.0
    By magikalpnoi in forum Qt Programming
    Replies: 2
    Last Post: 29th September 2006, 05:47
  5. Fix: QT app won't run under Oracle Standard Client install
    By GreyGeek in forum General Discussion
    Replies: 0
    Last Post: 12th May 2006, 18:20

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.