OracleParameter.Direction OracleParameter.Direction OracleParameter.Direction OracleParameter.Direction Property

定义

获取或设置一个值,该值指示参数是只可输入的参数、只可输出的参数、双向参数还是存储过程返回值参数。Gets or sets a value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.

public:
 virtual property System::Data::ParameterDirection Direction { System::Data::ParameterDirection get(); void set(System::Data::ParameterDirection value); };
public override System.Data.ParameterDirection Direction { get; set; }
member this.Direction : System.Data.ParameterDirection with get, set
Public Overrides Property Direction As ParameterDirection

属性值

ParameterDirection 值之一。One of the ParameterDirection values. 默认值为 InputThe default is Input.

实现

异常

属性未设置为有效的 ParameterDirection 值之一。The property was not set to one of the valid ParameterDirection values.

示例

下面的示例创建OracleParameter和设置的某些属性。The following example creates a OracleParameter and sets some of its properties.

Public Sub CreateOracleDbParameter()  
   Dim parameter As New OracleParameter()  
   parameter.ParameterName = "pDName"  
   parameter.DbType = DbType.String  
   parameter.Value = "ENGINEERING"  
   parameter.SourceColumn = "DName"  
End Sub  
public void CreateOracleDbParameter()   
{  
   OracleParameter parameter = new OracleParameter();  
   parameter.ParameterName = "pDName";  
   parameter.DbType = DbType.String;  
   parameter.Value = "ENGINEERING";  
   parameter.SourceColumn = "DName";  
}  

注解

如果ParameterDirection是输出,而执行的关联OracleCommand不会返回一个值,OracleParameter包含 null 值。If the ParameterDirection is output, and execution of the associated OracleCommand does not return a value, the OracleParameter contains a null value.

Output``InputOut,并ReturnValue参数返回通过调用ExecuteReader直到您调用不能访问CloseOracleDataReaderOutput, InputOut, and ReturnValue parameters returned by calling ExecuteReader cannot be accessed until you call Close on the OracleDataReader.

适用于