Results 1 to 5 of 5

Thread: QOCIDriver: unable to create environment problem

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QOCIDriver: unable to create environment problem

    Hello!

    I'm trying to connect to a remote Oracle database using Qt without success. The returned errors are "QOCIDriver: unable to create environment problem" and and error returned by lastError().text() is "Unable to logon". I'ld guess that's simply some problem in the data passed as configuration, but it's not: I checked it dozens of times. It's interesting to point out that I'm able to ping the remote server and a friend of mine did a testing application using MVS that was able to conenct to the database. I do have the QOCI driver etc.. The connection code is the sabe, basic code used in any example of connection to a database with Qt. What could be the problem? Unfortunately I don't get any other error message apart from these two when running in debug mode.

    bug XXX.png

    I'm glad for any help!

    Momergil


    Added after 1 48 minutes:


    Ok, it seems I found the answer in this post: http://www.qtcentre.org/threads/4888...te-environment

    I read it first, but I didn't think that I needed to download that "Instant Client" things that ChrisW67 talked about and put it in the same folder as my application.




    Momergil
    Attached Images Attached Images
    Last edited by Momergil; 29th July 2013 at 21:39.

  2. #2
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QOCIDriver: unable to create environment problem

    Ok - the problem is NOT solved. I thought I corrected my problem by downloading the .zip instant client installer and putting it in the same folder as my application - since it began to work after that -, but it seems now it has nothing to do with it, not just because it's working without, but also because I didn't even did the whole installation (putting the ORACLE_HOME as system variable, etc.) and still it worked. Rather, it seems it has much more to do with the fact I [re]installed the oracle database in my PC...

    But than, I got a problem. I want now to execute my app in another machine where I can't simply go there and install the oracle database... And putting the oracle client installer + ORACLE_HOME/Path haven't worked. I ask myself if the solution is that there is something lacking or is now a Qt problem, since the necessary steps for it to work, in accord to the Oracle documentation, were performed - and yet I still smell something related to installing the database...


    Any help would be welcomed

  3. #3
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QOCIDriver: unable to create environment problem

    Ok, I found a development... As ChristW67 pointed out in the other topic, the ORACLE_HOME must be pointed to a folder where a "BIN" folder is located. Inside it there is quite a lot of dlls that oracle connection needs to work. Since I haven't installed (and can't do it) the oracle database on the required PC, that environment variable/registry entry was not located ant the QOCI wasn't being able to do its work. Now that I entered the ORACLE_HOME as an environment variable and put some of the "BIN" Dlls there, it seems that Oracle began to find itself. The problem is that there is no chance I'm going to download 250 Mb of dlls and executables from my personal Oracle database to my client's computer, so I'm need of an application that tells me which dlls are required for my program to run. Process Explorer unfortunately don't do this, since it only tells which DLLs are already running.


    Any help in this problem would be welcomed

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QOCIDriver: unable to create environment problem

    Deploy your application with your compiled Qt OCI plugin.

    Install the Oracle Instant Client either from your Oracle Universal Installer or


    Once that is working you will probably find you only need to deploy OCI.DLL and anything it directly depends on.

  5. The following user says thank you to ChrisW67 for this useful post:

    Momergil (7th August 2013)

  6. #5
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QOCIDriver: unable to create environment problem

    Thanks Chris for the help, but at the end I managed to make my application work by installing a different option in Oracle's Universal Installer (something about installing the database's softwares, not the database itself). It seems that this option happens to install a lot of dlls and .exe that, at the end, made my app work. It's quite interesting, though, that I had to do this, since Oracle's instructions don't include doing such step - that ended with 3 Gb from my PC btw :x -, but only installing the Oracle Client thing :T

    But thanks anyway

    Momergil

Similar Threads

  1. QOCIDriver: unable to create environment
    By thaihoangluu in forum Newbie
    Replies: 18
    Last Post: 11th May 2012, 04:20
  2. Unable to create qwtPlot object
    By jtso8 in forum Qwt
    Replies: 7
    Last Post: 23rd January 2012, 07:43
  3. Visual Studio 2010 Add-In - unable to create project
    By garaddon in forum Installation and Deployment
    Replies: 2
    Last Post: 1st January 2011, 12:40
  4. Unable to successfully create Qt application
    By remy06 in forum Qt Programming
    Replies: 1
    Last Post: 25th April 2009, 14:51
  5. QSQLITE Unable to fetch row in create
    By xgoan in forum Newbie
    Replies: 3
    Last Post: 18th October 2006, 15:39

Tags for this Thread

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.