S
Sandeep Limaye
Hi,
I'm connecting to Oracle 9i database using ODP.NET (Using the
OracleConnection class). Can I use the same currently open connection for
executing a stored procedure / query through an ADODB.Command object?
I want to do something like this:
void ExecuteCommandObject ( ADODB.Command oAdoDbComm )
{
// ( I have this connection already open, just pasted the code here )
OracleConnection oOraConn = new OracleConnection (
strMyConnectionString );
oOraConn.Open ( );
// Statement giving me error
oAdoDbComm.ActiveConnection = ( ADODB.Connection ) oOraConn;
oAdoComm.Execute ( ... );
}
I may be expecting a bit too much, but is there any way that I can achieve
this? I do not want to open a separate connection through ADODB.Connection,
and I also do not want to convert the ADODB.Command object to an
OracleCommand because the two differ greatly in their "CommandText" formats,
and it's a great pain if the CommandText is complex and has parameter
holders.
Thanks in advance,
Sandeep
I'm connecting to Oracle 9i database using ODP.NET (Using the
OracleConnection class). Can I use the same currently open connection for
executing a stored procedure / query through an ADODB.Command object?
I want to do something like this:
void ExecuteCommandObject ( ADODB.Command oAdoDbComm )
{
// ( I have this connection already open, just pasted the code here )
OracleConnection oOraConn = new OracleConnection (
strMyConnectionString );
oOraConn.Open ( );
// Statement giving me error
oAdoDbComm.ActiveConnection = ( ADODB.Connection ) oOraConn;
oAdoComm.Execute ( ... );
}
I may be expecting a bit too much, but is there any way that I can achieve
this? I do not want to open a separate connection through ADODB.Connection,
and I also do not want to convert the ADODB.Command object to an
OracleCommand because the two differ greatly in their "CommandText" formats,
and it's a great pain if the CommandText is complex and has parameter
holders.
Thanks in advance,
Sandeep