If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > Ingres IIapi_initialize() error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-11-08, 07:50
DA Master DA Master is offline
Registered User
 
Join Date: May 2005
Location: Hull
Posts: 22
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"
Reply With Quote
  #2 (permalink)  
Old 03-11-08, 10:16
grantc grantc is offline
Registered User
 
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 10:21. Reason: clarified Ingres relase level
Reply With Quote
  #3 (permalink)  
Old 03-11-08, 11:03
DA Master DA Master is offline
Registered User
 
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"
Reply With Quote
  #4 (permalink)  
Old 03-11-08, 11:28
grantc grantc is offline
Registered User
 
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 12:13.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On