Link to home
Start Free TrialLog in
Avatar of vinaychannamsetty
vinaychannamsetty

asked on

Upgraded Oracle7.3.4 to 8.1.7.A Pro*C code is giving core dump when select fetche NULL and indicator variable is absent

We have upgraded Oracle from 7.3.4 to 8.1.7.
A pro*C application is giving core dump in new Oracle environment,but works fine in older verion.
This is due to the absence of indicator variable when SELECT fetches no records.

One of the migration issues of Oracle8 with respect to Pro*C precompiler(release8.1.) also says

"If you are migrating an application from Pro*C release 1.3 or release 1.4, used since Oracle V6, to Oracle8, there   is a major change in behavior if you do not use indicator variables. Oracle V6 does not return an error if you SELECT or FETCH a NULL into a host variable that has no associated indicator variable. With Oracle7, the normal behavior is that SELECTing or FETCHing a NULL into a host variable that has no associated indicator variable does cause an error.
The error code is ORA-01405 in SQLCODE and "22002" in SQLSTATE.
To avoid this error without re-coding your application, you can specify DBMS=V6, or you can specify UNSAFE_NULL=YES (as described on "UNSAFE_NULL" on page 9-37) with DBMS=V7 or V8 and MODE=ORACLE.However, Oracle recommends that you always use indicator variables in new Pro*C/C++ applications."

I did try using the above precompiler options in the makefile, but I still get core dump.
The second option of using indicator varaible is not preferred since the code is huge.

Also I am not sure how this application is working fine in Oracle7.3.4 since I don't find any of the above precompiler options in the makefile and without the above options there should be oracle error in Ver7.3.4.I checked the precompiler cfg file also but nothing is there in it.

I am not sure of the Pro*C precompiler version of the Oracle7.3.4.Any idea how to find out the precompiler version

Can anyone tell mehow to solve this problem?
ASKER CERTIFIED SOLUTION
Avatar of Daniel Stanley
Daniel Stanley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - Answered by: drs66  
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
Avatar of Netminder
Netminder