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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Urgent : OCI Gurus : Please Help . . .

Re: Urgent : OCI Gurus : Please Help . . .

From: <szhan_at_csclub.uwaterloo.ca>
Date: Tue, 13 Jul 1999 14:26:28 GMT
Message-ID: <7mfia4$k1s$1@nnrp1.deja.com>


In article <hfAi3.1116$TJ4.50600_at_dfiatx1-snr1.gtei.net>,   "Jet Long" <jfllong_at_gte.net> wrote:
> You will need to do the following:
> 1) Create the SQL that execute the stored procedure:
> begin
> procedure_name(:Arg1, :Arg2, ...);
> end;

I thought we can directly call OSP (oracle stored proc) from OCI without wrapping it with a layer of SQL statement.

There is very limited description (one page long) in the OCI programming guide. I still can not figure out how the whole thing work. If anyone know how to deal with OSP in OCI, I am more than happy to know.

> 2) Parse the above SQL:
> oparse(hstmt, sql_smt, strlen(sql_stmt), 1, 2);
> (I am assuming that you are using defered mode)
> 3) Bind the arguments(input/output) to your host variables: obndra
> 4) Assign the values to the inputs (i.e. host variables)
> 5) Execute the statment
>
> Hope that it helps.
>
> tanksali wrote in message <7luoiu$h90_at_dfw-ixnews9.ix.netcom.com>...
> >Hi,
> >
> > I am trying to write a C++ program which reads the following at run
time
> >(from a config file)
> >
> >1> Stored procedure name.
> >2> Arg 1, Arg 2 . . .
> >3> Val 1, Val 2 . . .
> >
> >The types of the arguments and their values will all be known only at
run
> >time.
> >My program needs to fire the stored procedure with the given
arguments
> >against the underlying Oracle database using OCI 7.3 calls and return
the
> >results.
> >
> >The main problems that I am facing are with respect to the dynamic
binding
> >of the variables.
> >Also obndra does not allow bind by position.
> >
> >Any help or ideas on how I can make my program fire the stored
procedure
> >given at run time with the arguments provided will be enormously
> >appreciated.
> >
> >Thanks in advance.
> >Shashank
> >
> >
> >
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Jul 13 1999 - 09:26:28 CDT

Original text of this message

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