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 -> Re: ProC Declaring host arrays in a separate class

Re: ProC Declaring host arrays in a separate class

From: dreadlord76 <dreadlord76_at_yahoo.com>
Date: 1 May 2002 13:10:27 -0700
Message-ID: <e6ddea21.0205011210.5c7d052e@posting.google.com>


Ed:

Thanks for the reply.

I did run the ProC pre-compiler, on the .PC file. the problem is, it does not alter the declaration in a .H file.

I need to clarify my question a bit. What I want to do is to declare host arrays in Class A. Then, in Class B, create an instance of Class A, then bind the host arrays in Class A in a method of Class B.

As far as I know, this means I need to declare the variables in the Header file for class A, include it in class B, then somehow, tell the ProC compiler I need to do:

SELECT ID FROM FOO INTO :instanceOfA->HostArray

Thanks in advance!

dreadlord76

Ed Prochak <edprochak_at_magicinterface.com> wrote in message news:<3CD00B20.657992D0_at_magicinterface.com>...
> sounds like you did not reun the ProC precompiler first.
> If you did run the ProC precompiler, all the EXEC... lines would be
> commented out.
>
>
> dreadlord76 wrote:
> >
> > I need to convert an existing single-threaded ProC application to be
> > multi-threaded. We use host arrays to speed up bulk processing.
> > Currently, host arrays are declared in a global scope:
> >
> > EXEC SQL BEGIN DECLARE SECTION;
> > long my_sample_id[100];
> > EXEC SQL END DECLARE SECTION;
> >
> > What I like to do, is to put these arrays in a helper class, and have
> > instances of the helper class associated with each sql_context. To do
> > this, I started by creating a Header file for the helper class.
> >
> > When the VC++ compiler tries to compile after ProC got through the .pc
> > file, the compiler barfs on the "EXEC SQL BEGIN DECLARE SECTION;" in
> > the header file.
> >
> > So is what I need to do possible? Can I declare host variables in a
> > class so I can have multiple instances of them, instead of declaring
> > them globally, or make them class specific?
> >
> > I can declare them in the scope of the class using the host arrays,
> > but not all instances of the class needs the host arrays, and the
> > memory allocation would be pretty large and wasteful.
> >
> > Thanks in advance!
> >
> > dreadlord76
Received on Wed May 01 2002 - 15:10:27 CDT

Original text of this message

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