Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OracleLob::IsTemporary Property

 

Gets a value indicating whether the OracleLob is a temporary LOB.

Namespace:   System.Data.OracleClient
Assembly:  System.Data.OracleClient (in System.Data.OracleClient.dll)

public:
property bool IsTemporary {
	bool get();
}

Property Value

Type: System::Boolean

true if the OracleLob is a temporary LOB, otherwise false.

Exception Condition
InvalidOperationException

The connection is closed.

ObjectDisposedException

The object was closed or disposed.

OracleException

An Oracle error has occurred.

The following example demonstrates how to create a temporary LOB.

OracleConnection connection = new OracleConnection("server=MyServer; integrated security=yes;");
connection.Open();
OracleTransaction transaction = connection.BeginTransaction();
OracleCommand command = connection.CreateCommand();
command.Transaction = transaction;
command.CommandText = "declare xx blob; begin dbms_lob.createtemporary(xx, false, 0); :tempblob := xx; end;";
command.Parameters.Add(new OracleParameter("tempblob", OracleType.Blob)).Direction = ParameterDirection.Output;
command.ExecuteNonQuery();
OracleLob tempLob = (OracleLob)command.Parameters[0].Value;
tempLob.BeginBatch(OracleLobOpenMode.ReadWrite);
tempLob.Write(tempbuff,0,tempbuff.Length);
tempLob.EndBatch();
command.Parameters.Clear();
command.CommandText = "MyTable.MyProc";
command.CommandType = CommandType.StoredProcedure;  
command.Parameters.Add(new OracleParameter("ImportDoc", OracleType.Blob)).Value = tempLob;
command.ExecuteNonQuery();
transaction.Commit();
connection.Close

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft