Delete
This method deletes the referenced object from the database.
Declaration
// C# - managed and core ODP.NET public void Delete();
// C# - unmanaged ODP.NET public void Delete(bool bFlush);
Parameters
-
bFlushA
boolthat specifies whether or not theREFis flushed immediately.
Remarks
This method marks the specified REF for deletion.
In managed ODP.NET and ODP.NET Core, Delete() has the same behavior as unmanaged ODP.NET Delete(true).
Depending on whether the value of bFlush is set to true or false, the following occurs:
-
TrueThe object referenced by the specified
REFis deleted immediately from the database.Before flushing objects, it is required that the application has explicitly started a transaction by executing the
BeginTransactionmethod on theOracleConnectionobject. This is because if the object being flushed has not already been locked by the application, an exclusive lock is obtained implicitly for the object. The lock is only released when the transaction commits or rollbacks. -
FalseThe object referenced by the
REFis not deleted immediately from the database, but only when a subsequentFlushmethod is invoked for the specifiedREFor theFlushCachemethod is invoked on theOracleRefor theFlushCachemethod is invoked on theOracleRefconnection.
See Also: