Re: problem with Pro*C

From: Sergio <skser_at_bigfoot.com>
Date: 22 May 2002 13:37:32 -0700
Message-ID: <11bd07c9.0205221237.1de092d8_at_posting.google.com>


ed.prochak_at_alltel.com (Ed prochak) wrote in message news:<e51b160.0205170923.3d08d950_at_posting.google.com>...
> skser_at_bigfoot.com (Sergio) wrote in message news:<11bd07c9.0205160701.1488fb41_at_posting.google.com>...
> > Hi
> > I did try to make a data access layer using Pro*C to access Oracle.
> > I did make a lot a test with the Pro*C samples but when I did try to
> > put the functionality in a function´s library that it seems not work
> > properly.
> > Could anyone help me about it ?
> >
> > Thanks
>
> What does "it seems not work properly" mean??
>
>
>
> Sorry but we cannot view your screen or read your mind as to what the
> problem is. Which version of ORACLE? which compiler? what Host
> operating system? what error messages? More information is needed.
>
> Try to reduce your code to the smallest example that still shows the
> problem and post that with the other details about versions and such.
>
>
>
> Edward J. Prochak --- Magic Interface, Ltd.
> Ofc: 440-498-3700 Cell: 440-666-9013
> on the web at --- http://www.magicinterface.com
> email: ed.prochak_at_magicinterface.com

That's ok!
Sorry
That is the problem :
I am trying to write a library that perfoms basic functions on an Oracle database using Pro*C.
Starting from the samples that came with Pro*C things stop working when I move some structures from global scope to a function since I need the code be thread-safe.
For example:

void function_a(SQLDA* select_dp)
{
[Quoted] // other code follows

    EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp

// other code follows

}

This code compiles fine but crashes with a nice Segmentation fault.

Any idea? Received on Wed May 22 2002 - 22:37:32 CEST

Original text of this message