OdbcParameter.Direction Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Recebe ou define um valor que indica se o parâmetro é apenas de entrada, apenas saída, bidirecional ou um parâmetro de retorno de procedimento armazenado.
public:
property System::Data::ParameterDirection Direction { System::Data::ParameterDirection get(); void set(System::Data::ParameterDirection value); };
public:
virtual property System::Data::ParameterDirection Direction { System::Data::ParameterDirection get(); void set(System::Data::ParameterDirection value); };
public System.Data.ParameterDirection Direction { get; set; }
public override System.Data.ParameterDirection Direction { get; set; }
member this.Direction : System.Data.ParameterDirection with get, set
Public Property Direction As ParameterDirection
Public Overrides Property Direction As ParameterDirection
Valor de Propriedade
Um dos ParameterDirection valores. A predefinição é Input.
Implementações
Exceções
A propriedade não foi definida para um dos valores válidos ParameterDirection .
Exemplos
O exemplo seguinte cria um OdbcParameter e define algumas das suas propriedades.
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;
}
Observações
Se o ParameterDirection for Output, e a execução do associado OdbcCommand não devolver um valor, o OdbcParameter conterá um valor nulo. Os valores nulos são tratados usando a DBNull classe.
Output, InputOut, e ReturnValue os parâmetros retornados ao chamar ExecuteReader não podem ser acedidos até que chamar Close ou Dispose no OdbcDataReader.