OdbcParameter.Direction Propiedad

Definición

Obtiene o establece un valor que indica si el parámetro es sólo de entrada, sólo de salida, bidireccional, o un valor devuelto de un procedimiento almacenado.

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

Valor de propiedad

Uno de los valores de ParameterDirection. De manera predeterminada, es Input.

Implementaciones

Excepciones

La propiedad no se ha establecido en uno de los valores de ParameterDirection válidos.

Ejemplos

En el ejemplo siguiente se crea y OdbcParameter se establecen algunas de sus propiedades.

Public Sub CreateMyProc(connection As OdbcConnection)  

   Dim command As OdbcCommand = connection.CreateCommand()  
   command.CommandText = "{ call MyProc(?,?,?) }"  
   command.Parameters.Add("", OdbcType.Int).Value = 1  
   command.Parameters.Add("", OdbcType.Decimal).Value = 2  
   command.Parameters.Add("", OdbcType.Decimal).Value = 3  

End Sub  
public void CreateMyProc(OdbcConnection connection)   
{  
   OdbcCommand command = connection.CreateCommand();  
   command.CommandText = "{ call MyProc(?,?,?) }";  
   command.Parameters.Add("", OdbcType.Int).Value = 1;  
   command.Parameters.Add("", OdbcType.Decimal).Value = 2;  
   command.Parameters.Add("", OdbcType.Decimal).Value = 3;  
}  

Comentarios

Si es Output, y la ParameterDirection ejecución del asociado OdbcCommand no devuelve un valor , OdbcParameter contendrá un valor NULL. Los valores NULL se controlan mediante la DBNull clase .

OutputNo se puede tener acceso a los parámetros , InputOuty ReturnValue devueltos mediante una llamada ExecuteReader a hasta que llame a Close o Dispose en .OdbcDataReader

Se aplica a

Consulte también