| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Where is struct sql_context defined??
It is not in any header file, the precompiler sticks it right in. Given the following pro*c program:
void main( int argc, char * argv[] )
{
sql_context ctx1, ctx2;
EXEC SQL ENABLE THREADS;
EXEC SQL CONTEXT ALLOCATE :ctx1;
EXEC SQL CONTEXT ALLOCATE :ctx2;
EXEC SQL CONTEXT USE :ctx1;
EXEC SQL CONTEXT FREE :ctx1;
EXEC SQL CONTEXT FREE :ctx2;
}
and the command: proc iname=x.pc threads=yes
the resultant x.c file will have in it:
/* Thread Safety */
typedef void * sql_context;
typedef void * SQL_CONTEXT;
It'll just "happen", its not in a header file.
On Thu, 26 Jun 1997 11:32:58 -0600, "Lance S. Nehring" <lnehrin_at_uswest.com> wrote:
>!#$%$%^&
>
>I'm running Oracle 7.32 and writing a ProC 2.2 program using pthreads on
>a HP K400 running HPUX-10.10.
>
>The example in the Pro*C Manual (Part NO. A32548-1) pages 3-109 thru
>3-113 show that a context is defined as type "sql_context". The only
>Oracle header file explicitly included in the example is "sqlca.h".
>
>My compiler is given the ORACLE_HOME/precomp/public include file path,
>so I know that it is finding "sqlca.h". Unfortunately, it barfs hard on
>any reference to "sql_context" as an unexpected symbol. Moreover, I
>believe that I've scanned all the Oracle header files and I cannot find
>"sql_context" typedef'd anywhere!!!
>
>This is a major bummer. Is the Pro*C manual syntax wrong? Is my Oracle
>7.32 installation damaged?
>
>Any help would be appreciated.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
![]() |
![]() |