OracleLob.IsTemporary 属性

定义

获取一个值,该值指示 OracleLob 是否为临时 LOB

public:
 property bool IsTemporary { bool get(); };
public bool IsTemporary { get; }
member this.IsTemporary : bool
Public ReadOnly Property IsTemporary As Boolean

属性值

如果 OracleLob 是临时 true,则为 LOB;否则为 false

例外

连接已关闭。

对象已关闭或已释放。

发生了 Oracle 错误。

注解

以下示例演示如何创建临时 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  

适用于