Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> 8i, Pro*C, and Dynamic SQL

8i, Pro*C, and Dynamic SQL

From: Clayton M. Arends <nospam_claytonarends_at_hotmail.com>
Date: Wed, 09 May 2001 20:20:32 GMT
Message-ID: <kEhK6.2864$Tl2.1999023@typhoon.san.rr.com>

All,

I hope someone can give me a clue of where to start looking to solve a problem one of my clients is running into (and therefore I am running into). We don't know if the problem is 8i specific but it began happening when they upgraded their server from 8 to 8i. We have other clients on various platforms running our application under 8i with no errors. This particular client is running Sun Solaris (I am unsure of the version but my employer suspects it to be 2.6).

My company has built a cross-platform server application that compiles using Pro*C. There is a segment of the application that allows the client to execute various SQL statements of their creation. For this, we use Pro*C Dynamic SQL method 4 and use both SELECT and BIND descriptors. Since the client upgraded to 8i, whenever they execute our application a "Segmentation Fault" is thrown at the following Pro*C line:

    EXEC SQL DESCRIBE SELECT LIST FOR Dynamic_SQL_Query INTO selda;

Of course I doubted our software at this point and so I went back to the basics and modified Oracle's "sample12.pc" file to use a valid SQL statement and to accept a username/password from the command-line. I had the client compile and run this program and found that it throws a "Segmentation Fault" at the same Pro*C statement. One other change I made which "might" have caused the problem is to change the following includes:

#include <sqlca.h>
#include <sqlda.h>
#include <sqlcpr.h>

... to this:

    EXEC SQL INCLUDE sqlca;
    EXEC SQL INCLUDE sqlda;

For some reason the program wouldn't compile using the standard #include lines and "sqlcpr" didn't appear to be required.

In light of this information I now suspect one of three possibilities. 1) A configuration problem on their system is causing Dynamic SQL statements to error. 2) Some combination of Solaris, 8i, and/or the C compiler is causing the error. 3) My including of the Pro*C files was incorrect.

I would appreciate any insight. Though I am an experienced developer I am a novice when it comes to Pro*C configuration and debugging.

TIA, Clayton M. Arends Received on Wed May 09 2001 - 15:20:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US