Results 1 to 6 of 6

Thread: Oracle11 c++

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    19

    Oracle11 c++

    Hi,

    I,m trying to connect a c++ aplication with oracle11, from ilog gadget with an iliSqlDataSource there is not problems, data is shown perfctly.

    But when i try to implement the conection with c++ code, the program can not make it. The code i,m using is the next.

    -----------------------------------------------------
    IliSQLSession* session = new IliSQLSession("oracle11", "user/pass@options");
    session->lock();
    session->setDatabaseName("ORACLE_DATABASE_NAME");
    session->setSessionName("Main");

    IliSQLSession::RegisterSession(session);

    if( !session->connect() )
    {
    std::cout << "connected";
    }

    -----------------------------------------------------

    But it never conects to the database. Even trying to get the getDbmsName retrives a null pointer.

    Please could you give me some help.

    Thank you very much.

    regards.

  2. #2
    Junior Member
    Join Date
    Oct 2012
    Posts
    29
    Hello paranada_g,

    Your problem comes form the database name you set.
    Simply remove the line:
    session->setDatabaseName("...")
    and the connect call will work.

    Claude.

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    19
    Hi,

    Thanks for your response.

    I have tried many things one of this was that one you propose. But not conection available.

    To give you more information.

    IlInt i = 5;
    const char* const* vf = IliSQLSession::GetDbmsNames(i);--> This always returns null.

    And next

    session->queryConnect(appli->getDisplay(),NULL);--> shows a dialog that tries to conect to database but always returns the next error "unable to connect to data source".

    Thank you very much.

  4. #4
    Junior Member
    Join Date
    Mar 2013
    Posts
    19
    Hi,

    I keep trying to connect and i got the following error message from this code

    "sess->queryConnect(appli->getDisplay(),NULL);".

    "Unknown DBLink drivers link mode "

    Please could you help me to sort this out.

    Thank you.

  5. #5
    Junior Member
    Join Date
    Oct 2012
    Posts
    29
    Hello,
    Sorry I overlooked your request.

    For this issue, I need to know more of the way your application is build. Can you show the link command line?

    Claude

  6. #6
    Junior Member
    Join Date
    Mar 2013
    Posts
    19

    Smile Error message

    Hi,

    this is exactly the message received.

    "CWZDL0044E Unknown DBLink drivers link mode"

    I,m using visual studio 2010 and oracle 11g.

    When i run the form with ilog studio there is not problem, the data is shown in the interface. But when running the program with visual studio appears that message.

    Anything you guess.

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •