/// <include file='doc\OracleLob.uex' path='docs/doc[@for="OracleLob.EndBatch"]/*' /> public void EndBatch() { AssertObjectNotDisposed(); if (!IsNull) { AssertConnectionIsOpen(); LobLocator.ForceClose(); } }
/// <include file='doc\OracleLob.uex' path='docs/doc[@for="OracleLob.BeginBatch2"]/*' /> public void BeginBatch(OracleLobOpenMode mode) { AssertObjectNotDisposed(); if (!IsNull) { AssertConnectionIsOpen(); LobLocator.Open(mode); } }
/// <include file='doc\OracleBFile.uex' path='docs/doc[@for="OracleBFile.SetFileName"]/*' /> public void SetFileName( string directory, string file ) { AssertInternalLobIsValid(); if (!IsNull) { _lob.AssertConnectionIsOpen(); _lob.AssertTransactionExists(); LobLocator.ForceClose(); // MDAC 86200: must be closed or the ForceOpen below will leak opens... IntPtr newHandle = (IntPtr)LobLocator.Handle; int rc = TracedNativeMethods.OCILobFileSetName( Connection.EnvironmentHandle, ErrorHandle, ref newHandle, directory, (short)directory.Length, file, (short)file.Length ); if (0 != rc) { Connection.CheckError(ErrorHandle, rc); } LobLocator.ForceOpen(); // SetFileName automatically closes the BFILE on the server, we reopen it Debug.Assert((IntPtr)LobLocator.Handle == newHandle, "OCILobFileSetName changed the handle!"); // Should never happen... Descriptor.SetOciHandle(newHandle); // ...but just in case. _fileName = null; _directoryAlias = null; _lob.Position = 0; } }
private void EnsureLobIsOpened() { LobLocator.Open(OracleLobOpenMode.ReadOnly); }