Home » Developer & Programmer » Precompilers, OCI & OCCI » INTERNAL ERROR (Pro*C/C++: Release 10.2.0.5.0)
INTERNAL ERROR [message #471384] Fri, 13 August 2010 13:44 Go to next message
SasDutta
Messages: 9
Registered: July 2010
Junior Member
Hi

I am trying to compile a pro c file. Rest of the pro c file is compiling fine. But one perticular file is showing following error.

INTERNAL ERROR: Failed Assertion [Code=40706]

Can any body tell me what could be the posible reason of this error.

Thanks in advance
Sas
Re: INTERNAL ERROR [message #471386 is a reply to message #471384] Fri, 13 August 2010 13:50 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Without any code, without any output, without even knowing if it is an error related to Oracle, yes we can help as we are omniscient genius.

Regards
Michel
Re: INTERNAL ERROR [message #471387 is a reply to message #471386] Fri, 13 August 2010 14:02 Go to previous messageGo to next message
SasDutta
Messages: 9
Registered: July 2010
Junior Member
Michel Cadot wrote on Fri, 13 August 2010 13:50
Without any code, without any output, without even knowing if it is an error related to Oracle, yes we can help as we are omniscient genius.

Regards
Michel


This is the code i am compiling

#include <stdio.h>
#include <string.h>
#include <sqlda.h>
#include <sqlcpr.h>
#include <stdlib.h>
#include "getA0TargInp.h"
#include "utilDB.h"
#include "modelStruct.h"

#define NO_DATA_FOUND 0;

EXEC SQL INCLUDE SQLCA.H;

EXEC SQL BEGIN DECLARE SECTION;
int a0TargInpCnt=0;
EXEC SQL END DECLARE SECTION;


void a0TargInpCnt (const char* runDt, char *dow, char *verName )
{

        EXEC SQL SELECT COUNT('1')
                   INTO :a0TargInpCnt
                   FROM(SELECT NVL(b.equip_cd,'NULL'),
                                NVL(a.minm_a0_chg_allw,0),
                                NVL(a.max_a0_chg_allw,0),
                                NVL(a.a0_inctv, 0),
                                NVL(a.apply_cnstrn_flag,'NULL'),
                                NVL(a.hard_cnstrn_flag,'NULL'),
                                NVL(a.bank_start,0),
                                NVL(a.bank_end,0)
                         FROM a0_targ_inp a,
                                 a0_targ_inp_equip b
                        WHERE a.A0_TARG_INP_ID=b.a0_targ_inp_id(+)
                        AND a.da_mon=DECODE(a.da_mon,'Y','Y',:dow[0])
                        AND a.da_tue=DECODE(a.da_tue,'Y','Y',:dow[1])
                        AND a.da_wed=DECODE(a.da_wed,'Y','Y',:dow[2])
                        AND a.da_thur=DECODE(a.da_thur,'Y','Y',:dow[3])
                        AND a.da_fri=DECODE(a.da_fri,'Y','Y',:dow[4])
                        AND a.da_sat=DECODE(a.da_sat,'Y','Y',:dow[5])
                        AND a.da_sun=DECODE(a.da_sun,'Y','Y',:dow[6])
                        AND a.ver_id=(select ver_id FROM versions WHERE ver_nm=:verName)
                        AND a.eff_dt<=:runDt
                        AND a.discont_dt>=:runDt
                        AND NVL(b.EQUIP_GRP_FLAG,'N')='N'
 UNION
                        SELECT NVL(b.equip_cd,'NULL'),
                                NVL(a.minm_a0_chg_allw,0),
                                NVL(a.max_a0_chg_allw,0),
                                NVL(a.a0_inctv, 0),
                                NVL(a.apply_cnstrn_flag,'NULL'),
                                NVL(a.hard_cnstrn_flag,'NULL'),
                                NVL(a.bank_start,0),
                                NVL(a.bank_end,0)
                        FROM a0_targ_inp a,
                                a0_targ_inp_equip b
                        WHERE a.A0_TARG_INP_ID=b.a0_targ_inp_id(+)
                        AND a.da_mon=DECODE(a.da_mon,'Y','Y',:dow[0])
                        AND a.da_tue=DECODE(a.da_tue,'Y','Y',:dow[1])
                        AND a.da_wed=DECODE(a.da_wed,'Y','Y',:dow[2])
                        AND a.da_thur=DECODE(a.da_thur,'Y','Y',:dow[3])
                        AND a.da_fri=DECODE(a.da_fri,'Y','Y',:dow[4])
                        AND a.da_sat=DECODE(a.da_sat,'Y','Y',:dow[5])
                        AND a.da_sun=DECODE(a.da_sun,'Y','Y',:dow[6])
                        AND a.ver_id=(select ver_id FROM versions WHERE ver_nm=:verName)
                        AND a.eff_dt<=:runDt
                        AND a.discont_dt>=:runDt
                        AND NVL(b.EQUIP_GRP_FLAG,'N')='Y');


}


void populateModelA0TargInp(struct a0_targ_inp* a0TargInp, void** modelStruct)
{
        int i=0;
        struct  model_a0_targ_inp *tmp,model;
       * modelStruct=(struct model_a0_targ_inp *)calloc(a0TargInpCnt,sizeof(model));

        tmp=*modelStruct;



        for(i;i<a0TargInpCnt;i++)
        {


                 strcpy(tmp->equipCd,a0TargInp->equipCd);
                tmp->minChgAllowed=a0TargInp->minChgAllowed;
                tmp->maxChgAllowed=a0TargInp->maxChgAllowed;
                tmp->a0Inctv=a0TargInp->a0Inctv;
                strcpy(tmp->applCnstrnFlag,a0TargInp->applCnstrnFlag);
                strcpy(tmp->hardCnstrnFlag,a0TargInp->hardCnstrnFlag);
                tmp->bankStart=a0TargInp->bankStart;
                tmp->bankEnd=a0TargInp->bankEnd;


                tmp=tmp+1;
                a0TargInp=a0TargInp+1;

        }

}






int getA0TargInp (const char* runDt, char * dow, char *verName, void** modelStruct )
{
                        struct a0_targ_inp* a0TargInp;
                        struct a0_targ_inp a0;
                        int cnt;


                        EXEC SQL DECLARE get_a0_targ_inp CURSOR FOR
                                        SELECT NVL(b.equip_cd,'NULL'),
                                                NVL(a.minm_a0_chg_allw,0),
                                                NVL(a.max_a0_chg_allw,0),
                                                NVL(a.a0_inctv, 0),
                                                NVL(a.apply_cnstrn_flag,'NULL'),
                                                NVL(a.hard_cnstrn_flag,'NULL'),
                                                NVL(a.bank_start,0),
                                                NVL(a.bank_end,0)
                                         FROM a0_targ_inp a,
                                                 a0_targ_inp_equip b
                                        WHERE a.A0_TARG_INP_ID=b.a0_targ_inp_id(+)
                                        AND a.da_mon=DECODE(a.da_mon,'Y','Y',:dow[0])
                                        AND a.da_tue=DECODE(a.da_tue,'Y','Y',:dow[1])
                                        AND a.da_wed=DECODE(a.da_wed,'Y','Y',:dow[2])
                                        AND a.da_thur=DECODE(a.da_thur,'Y','Y',:dow[3])
                                        AND a.da_fri=DECODE(a.da_fri,'Y','Y',:dow[4])
                                        AND a.da_sat=DECODE(a.da_sat,'Y','Y',:dow[5])
                                        AND a.da_sun=DECODE(a.da_sun,'Y','Y',:dow[6])
                                        AND a.ver_id=(select ver_id FROM versions WHERE ver_nm=:verName)
                                        AND a.eff_dt<=:runDt
                                        AND a.discont_dt>=:runDt
                                        AND NVL(b.EQUIP_GRP_FLAG,'N')='N'
                                        UNION
                                        SELECT NVL(b.equip_cd,'NULL'),
                                                NVL(a.minm_a0_chg_allw,0),
                                                NVL(a.max_a0_chg_allw,0),
                                                NVL(a.a0_inctv, 0),
                                                NVL(a.apply_cnstrn_flag,'NULL'),
                                                NVL(a.hard_cnstrn_flag,'NULL'),
                                                NVL(a.bank_start,0),
                                                NVL(a.bank_end,0)
                                        FROM a0_targ_inp a,
                                                a0_targ_inp_equip b
                                        WHERE a.A0_TARG_INP_ID=b.a0_targ_inp_id(+)
                                        AND a.da_mon=DECODE(a.da_mon,'Y','Y',:dow[0])
                                        AND a.da_tue=DECODE(a.da_tue,'Y','Y',:dow[1])
                                        AND a.da_wed=DECODE(a.da_wed,'Y','Y',:dow[2])
                                        AND a.da_thur=DECODE(a.da_thur,'Y','Y',:dow[3])
                                        AND a.da_fri=DECODE(a.da_fri,'Y','Y',:dow[4])
                                        AND a.da_sat=DECODE(a.da_sat,'Y','Y',:dow[5])
                                        AND a.da_sun=DECODE(a.da_sun,'Y','Y',:dow[6])
                                        AND a.ver_id=(select ver_id FROM versions WHERE ver_nm=:verName)
                                        AND a.eff_dt<=:runDt
                                        AND a.discont_dt>=:runDt
                                        AND NVL(b.EQUIP_GRP_FLAG,'N')='Y';



                        /*
                        Get the no of records that query might fetch so that dynamic memory allocation can be done
                        */

                        a0TargInpCnt(runDt,dow,verName);

                         if(a0TargInpCnt==0)
                        {

                                return NO_DATA_FOUND;
                        }
                        else
                        {

                           /*
                                Decalre array of structure dynamically so that this array can hold the result set of query
                                */

                                a0TargInp =( struct a0_targ_inp *)calloc(a0TargInpCnt,sizeof(a0));

                                EXEC SQL WHENEVER sqlerror DO handleError("Error occured during fetch of a0 Target input  data");

                                EXEC SQL OPEN get_a0_targ_inp;

                                EXEC SQL WHENEVER NOT FOUND DO break;

                                for(;;)
                                {
                                        EXEC SQL FOR :a0TargInpCnt FETCH get_a0_targ_inp INTO :a0TargInp;

                                }



                                EXEC SQL CLOSE get_a0_targ_inp;


                               populateModelA0TargInp(a0TargInp, modelStruct);

                                if(a0TargInp)
                                free(a0TargInp);

                                return (a0TargInpCnt);
                        }

}
                                                                                     
Re: INTERNAL ERROR [message #471388 is a reply to message #471387] Fri, 13 August 2010 14:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And the execution showing the error?
Where does the error reach?

Regards
Michel
Re: INTERNAL ERROR [message #471389 is a reply to message #471388] Fri, 13 August 2010 14:26 Go to previous messageGo to next message
SasDutta
Messages: 9
Registered: July 2010
Junior Member
It is not able to produce .c file
Re: INTERNAL ERROR [message #471390 is a reply to message #471389] Fri, 13 August 2010 14:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So post the compilation listing.

Regards
Michel
Re: INTERNAL ERROR [message #522240 is a reply to message #471390] Wed, 07 September 2011 10:02 Go to previous messageGo to next message
vijay shankar
Messages: 6
Registered: September 2011
Junior Member
Hi,
I'm doing a project by Oracle as back-end and C as front-end. In my college we were using 9i but i'm having Oracle 10g only.
After i installed that in my lap Windows 7 32bit i didn't find the Pro*C/C++.exe.
What can i do??? Or this there any other way is there to convert *.pc into *.c file in oracle 10g?

[Updated on: Wed, 07 September 2011 10:40] by Moderator

Report message to a moderator

Re: INTERNAL ERROR [message #522248 is a reply to message #522240] Wed, 07 September 2011 10:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
After i installed that in my lap

You install what? With which options?

Regards
Michel
Re: INTERNAL ERROR [message #522332 is a reply to message #522248] Thu, 08 September 2011 09:26 Go to previous messageGo to next message
vijay shankar
Messages: 6
Registered: September 2011
Junior Member
First thank you for your reply.
-->I installed Oracle 10g. But in this version PRO*C/C++ isn't available.
-->I need that to convert *pc file into *.c file.
-->Is there is any other option or method is available for convert *.pc file into *.c file.
Re: INTERNAL ERROR [message #522337 is a reply to message #522332] Thu, 08 September 2011 10:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Once again:

Quote:
You install what? With which options?


Post EXACTLY from which file you install (what is its name?), which options you clicked on and so on.

Regards
Michel
Re: INTERNAL ERROR [message #522365 is a reply to message #522337] Thu, 08 September 2011 23:57 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Maybe not related to your current problem, but - what is your Windows 7 version? If it is a Home, note that Oracle is not certified to work on such a platform.
Re: INTERNAL ERROR [message #522444 is a reply to message #522365] Fri, 09 September 2011 11:18 Go to previous message
vijay shankar
Messages: 6
Registered: September 2011
Junior Member
->i installed the oracle according to the "Oracle_10g_Installation" guide. In that installation process i select advanced installation and then installed that oracle.
->I'm having ultimate edition.
Previous Topic: Using OCI and distributed transactions with ProC
Next Topic: Help! Why I failed to update BLOB field by using SQLT_LNG?
Goto Forum:
  


Current Time: Fri Mar 29 03:36:15 CDT 2024