Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Urgent : OCI Gurus : Please Help . . .
You will need to do the following:
1) Create the SQL that execute the stored procedure:
begin
procedure_name(:Arg1, :Arg2, ...);
end;
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
>
>
>
Received on Tue Jul 13 1999 - 00:36:13 CDT
![]() |
![]() |