Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Location
    Hull
    Posts
    22

    Unanswered: Ingres IIapi_initialize() error

    Hi all,

    I am trying to find out what is causing the issue when starting an application that connects to Ingres.

    When it loads I am getting the following error:

    Iiapi_initialize() return code = 8 (OUT_OF_MEMORY)

    Things I see point to issues with the II_SYSTEM environment variable not set on the machine but this is set and points to the correct path.

    Thanks in advance.
    "I hate quotes, tell me what you know"

  2. #2
    Join Date
    Jul 2007
    Posts
    3
    Hi DA Master

    What version of Ingres are you coding against? The following block of code, taken from the Ingres PHP interface, initializes OpenAPI according to the API level available (works up to Ingres 2006 release 3):

    Code:
        IIAPI_INITPARM initParm;
    
        /* Ingres api initialization */
        /* timeout in ms, -1, (default) = no timeout */
        initParm.in_timeout = -1;
    
    #if defined(IIAPI_VERSION_6) 
        initParm.in_version = IIAPI_VERSION_6;
    #elif defined(IIAPI_VERSION_5) 
        initParm.in_version = IIAPI_VERSION_5;
    #elif defined(IIAPI_VERSION_4) 
        initParm.in_version = IIAPI_VERSION_4;
    #elif defined(IIAPI_VERSION_3)
        initParm.in_version = IIAPI_VERSION_3;
    #elif defined(IIAPI_VERSION_2) 
        initParm.in_version = IIAPI_VERSION_2;
    #else
        initParm.in_version = IIAPI_VERSION_1;
    #endif
    
        IIapi_initialize(&initParm);
    
    #if defined(IIAPI_VERSION_2)
        if ( initParm.in_envHandle != NULL )
        {    
           /* Store Env handle */
        }
    #endif
    Hopefully this helps

    regards

    grant
    Last edited by grantc; 03-11-08 at 11:21. Reason: clarified Ingres relase level

  3. #3
    Join Date
    May 2005
    Location
    Hull
    Posts
    22
    Well... we install version 2.5 of the client.

    It runs as part of a suite of applications we use for customer billing and such like at our telecom company, really version I know but nothing to do with me!
    "I hate quotes, tell me what you know"

  4. #4
    Join Date
    Jul 2007
    Posts
    3
    Quote Originally Posted by DA Master
    Well... we install version 2.5 of the client.

    It runs as part of a suite of applications we use for customer billing and such like at our telecom company, really version I know but nothing to do with me!
    No problem, if you are looking at 2.5 only code then the following will work:

    Code:
        IIAPI_INITPARM initParm;
    
        /* Ingres api initialization */
        /* timeout in ms, -1, (default) = no timeout */
        initParm.in_timeout = -1;
        /* IIAPI_VERSION_1 = OpenIngres 2.0 / II 2.0 */
        /* IIAPI_VERSION_2 = II 2.5 */
        /* IIAPI_VERSION_3 = II 2.6 */
        /* IIAPI_VERSION_4 = Ingres r3 / Ingres 2006*/
        /* IIAPI_VERSION_5 = Ingres 2006 release 2 */
        /* IIAPI_VERSION_6 = Ingres 2006 release 6 */
        initParm.in_version = IIAPI_VERSION_2;
        IIapi_initialize(&initParm);
    #if defined(IIAPI_VERSION_2)
        if ( initParm.in_envHandle != NULL )
        {    
           /* Store or ignore Env handle */
        }
    #endif
    Last edited by grantc; 03-11-08 at 13:13.

Posting Permissions

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