OracleLob.BeginBatch Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prevents server-side triggers from firing while performing multiple write operations.
Overloads
BeginBatch() |
Prevents server-side triggers from firing while performing multiple read operations. |
BeginBatch(OracleLobOpenMode) |
Prevents server-side triggers from firing while performing multiple read and write operations in the specified access mode. |
BeginBatch()
Prevents server-side triggers from firing while performing multiple read operations.
public:
void BeginBatch();
public void BeginBatch ();
member this.BeginBatch : unit -> unit
Public Sub BeginBatch ()
Exceptions
The connection is closed.
The object was closed or disposed.
An Oracle error has occurred.
Remarks
Opens the LOB
in ReadOnly mode; therefore, the LOB
can only be read from, not written to, until the corresponding call to EndBatch. To perform batch writes to the LOB
, call BeginBatch with ReadWrite.
Calling BeginBatch more than one time within the same transaction currently throws the Oracle "ORA-22293: LOB already opened in the same transaction" error. In addition, if you obtain the LOB
using another OracleDataReader, and the original caller has not called the EndBatch method, the same error is generated. Therefore, you must call the EndBatch method when you are finished using the OracleLob.
Applies to
BeginBatch(OracleLobOpenMode)
Prevents server-side triggers from firing while performing multiple read and write operations in the specified access mode.
public:
void BeginBatch(System::Data::OracleClient::OracleLobOpenMode mode);
public void BeginBatch (System.Data.OracleClient.OracleLobOpenMode mode);
member this.BeginBatch : System.Data.OracleClient.OracleLobOpenMode -> unit
Public Sub BeginBatch (mode As OracleLobOpenMode)
Parameters
- mode
- OracleLobOpenMode
Mode (one of the OracleLobOpenMode values) in which the LOB
can be accessed between this BeginBatch(OracleLobOpenMode) call and the corresponding EndBatch() call.
Exceptions
The connection is closed.
The object was closed or disposed.
An Oracle error has occurred.
Remarks
To write to the LOB
, you must have retrieved the LOB
using the FOR UPDATE clause in the SQL SELECT statement, and you must have a local transaction started.
Calling BeginBatch more than one time within the same transaction currently throws the Oracle "ORA-22293: LOB already opened in the same transaction" error. In addition, if you obtain the LOB
using another OracleDataReader, and the original caller has not called the EndBatch method, the same error is generated. Therefore, you must call the EndBatch method when you are finished using the OracleLob.