RE: Call Stored Procedure from C++

RE: Call Stored Procedure from C++

 

  

Debra,

Hope this helps.

1. You need to build a dll from your cpp
2. Create a Oracle LIBRARY object as
create library test_lib as
'g:\project\ora_libs\test_lib.dll';

3. When you create your procedure/function you need to specify AS clause
as

procedure test_ext_call( p_param1 in char,
p_param2 in out char )
as
language C
name "test_lib_routine" -- This is your c++ function.
library test_lib -- This is your library name
with context
parameters ( CONTEXT,
p_param1 STRING,
p_param1 INDICATOR short,
p_param2 STRING,
p_param2 INDICATOR short,
p_param2 MAXLEN int );

Regards,
Steve.
-----Original Message-----
From: debra
[mailto:oracledba-ezmlmshield-x65921365.[Email address protected]
Sent: 31 May 2006 16:10
To: LazyDBA Discussion
Subject: Call Stored Procedure from C++

Does anyone have an example of (1) how to call a stored procedure from a
c++ program (2) how to link in the required occi libraries?

I'm assuming that occi is the way to go, but can consider other options,
recommendations. Thanks in advance!





--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

Oracle LazyDBA home page