Name

OleDbParameter

Synopsis

This class represents a parameter for a stored procedure or parameterized query. For information about the basic OleDbParameter members, refer to the reference for the System.Data.IDbDataParameter and System.Data.IDataParameter interfaces, which OleDbParameter implements.

In addition, the OleDbParameter class adds a new property: OleDbType. This property sets the OLE DB data type of a parameter. You should always set this value (explicitly, or through one of the constructors) rather than the more general DbType. When you set OleDbType, DbType is updated automatically with the most compatible System.Data.DbType value.

public sealed class OleDbParameter : MarshalByRefObject, System.Data.IDbDataParameter, System.Data.IDataParameter,

        ICloneable {

// Public Constructors

   public OleDbParameter( );  

   public OleDbParameter(string name, object value);  

   public OleDbParameter(string name, OleDbType dataType);  

   public OleDbParameter(string name, OleDbType dataType, int size);

   public OleDbParameter(string parameterName, OleDbType dbType, int size, System.Data.ParameterDirection direction,

        bool isNullable, byte precision, byte scale, string srcColumn, System.Data.DataRowVersion srcVersion, object value);

   public OleDbParameter(string name, OleDbType dataType, int size, string srcColumn); 

// Public Instance Properties

   public DbType DbType{set; get; }                            // implements System.Data.IDataParameter

   public ParameterDirection Direction{set; get; }             // implements System.Data.IDataParameter ...

Get ADO.NET in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.