OracleDataSourceCommand Class
OracleDataSourceCommand
opens a connection on behalf of an OracleDataSource
object, executes a command, closes the connection.
This class has no public constructor. Class instances are obtained by calling OracleDataSource.CreateCommand()
.
All OracleDataSourceCommand
public methods function identically to OracleCommand
public methods. The only difference is OracleDataSourceCommand
internally opens a connection when an execution method (e.g., ExecuteNonQuery()
) is called, then closes the connection after the execution completes. Data types that defer data retrieval, such as CLOB
s, BLOB
s, and REF Cursors
, will not work unless the app uses ExecuteReader()
. This method keeps the connection open until the reader is closed.
The user does not interact with any connections when working with OracleDataSourceCommand
.
A few OracleDataSourceCommand
public methods have exceptions to this behavior. Those exceptions are noted in each public method's remarks.
Class Inheritance
System.Object
System.Data.Common.DbCommand
Oracle.ManagedDataAccess.Client.OracleCommand
Oracle.ManagedDataAccess.Client.OracleDataSourceCommand
Declaration
// C# public class OracleDataSourceCommand : OracleCommand
Requirements
Provider | ODP.NET Core |
---|---|
Assembly |
|
Namespace |
|
.NET Framework |
- |
.NET (Core) |
Thread Safety
All public static methods are thread-safe, although instance methods do not guarantee thread safety.