I'm interested in purchasing OraDirect.NET, but first I need to know if I can do the following...
I have defined a "Contact" class in C#.
I have also defined (in an Oracle db schema) an "oraContact" object. The "oraContact" is an "object" type and is used as parameters in stored procs.
Using OraDirect.NET, I would like to pass my C# contact object as a parm to an oracle stored procedure that expects an "oraContact" object. Can this be done?
Thanks,
Chris
Oracle "object" type and C#...
Let we have
and the oracle stored proc
Our is initialized and opened.
First, we create a command and bind it to the connection:
Then whe create N input parameters using the master named param1, ..., paramN.
The type of our Command is "Text". Type in the master the following command:
begin
P_MYPROC( MY_OBJECT( :param1, ..., paramN ) );
end;
Try it.
Code: Select all
type MY_OBJECT as object( param1 in varchar, ..., paramN in varchar)
Code: Select all
P_MYPROC( pOBJ in MY_OBJECT )
Code: Select all
OracleConnection myConnection
First, we create a command and bind it to the connection:
Code: Select all
OracleCommand com = new OracleCommand();
com.Connection = myConnection;
The type of our Command is "Text". Type in the master the following command:
begin
P_MYPROC( MY_OBJECT( :param1, ..., paramN ) );
end;
Try it.