System.Data.SqlClient Namespace SqlParameter Class
Sets or retrieves the direction of the parameter.
Script |
SqlParameter.Direction [ = enumValue ] |
The property is read/write with a default value of Input.
IDataParameter.Direction
Use the Direction property to specify or determine whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.
After the last row from the last resultset is read, Output, InputOut, and ReturnValue parameters are updated. If the ParameterDirection is Output, and execution of the associated SqlCommand does not return a value, the SqlParameter contains a null value.
The following example initializes an SqlParameter and sets some of its properties.
public void CreateSqlParameter ( ) {
SqlParameter myParam = new SqlParameter ( "@Description", SqlDbType.VarChar, 100 );
myParam.Direction = ParameterDirection.Output;
}
Public Sub CreateSqlParameter ( )
Dim myParam As New SqlParameter ( "@Description", SqlDbType.VarChar, 100 )
myParam.Direction = ParameterDirection.Output
End Sub |
|
C# |
VB |
SqlParameter Members