asp.net.ph

OleDbParameter Class

System.Data.OleDb Namespace


Represents a parameter to an OleDbCommand, and optionally, its mapping to a DataSet column.

OleDbParameter Class Members

Collapse   Constructors

Visibility Constructor Parameters
public OleDbParameter ( )
public OleDbParameter ( String name , Object value )
public OleDbParameter ( String name , OleDbType dataType )
public OleDbParameter ( String name , OleDbType dataType , Int32 size )
public OleDbParameter ( String name , OleDbType dataType , Int32 size , String srcColumn )
public OleDbParameter ( String parameterName , OleDbType dbType , Int32 size , ParameterDirection direction , Boolean isNullable , Byte precision , Byte scale , String srcColumn , DataRowVersion srcVersion , Object value )
public OleDbParameter ( String parameterName , OleDbType dbType , Int32 size , ParameterDirection direction , Byte precision , Byte scale , String sourceColumn , DataRowVersion sourceVersion , Boolean sourceColumnNullMapping , Object value )

Collapse   Properties

Visibility Name Value Type Accessibility
public DbType DbType [ Get , Set ]
public Direction ParameterDirection [ Get , Set ]
public IsNullable Boolean [ Get , Set ]
public OleDbType OleDbType [ Get , Set ]
public ParameterName String [ Get , Set ]
public Precision Byte [ Get , Set ]
public Scale Byte [ Get , Set ]
public Size Int32 [ Get , Set ]
public SourceColumn String [ Get , Set ]
public SourceColumnNullMapping Boolean [ Get , Set ]
public SourceVersion DataRowVersion [ Get , Set ]
public Value Object [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
public ResetDbType ( ) Void
public ResetOleDbType ( ) Void
public ToString ( ) String

Remarks

Parameter names are not case sensitive.

Example

The following example initializes multiple instances of OleDbParameter through the OleDbParameterCollection within the OleDbDataAdapter. These parameters are used to select data from the data source and place the data in the DataSet. This example assumes that a DataSet and an OleDbDataAdapter have already been created with the appropriate schema, commands, and connection.

void AddOleDbParameters ( ) {
   // ...
   // create myDataSet and myDataAdapter
   // ...
   myDataAdapter.SelectCommand.Parameters.Add ( "@CategoryName", 
      OleDbType.VarChar, 80 ).Value = "toasters";
   myDataAdapter.SelectCommand.Parameters.Add ( "@SerialNum", 
      OleDbType.Int ).Value = 239;
   myDataAdapter.Fill ( myDataSet );
}
  C# VB

See Also

OleDbParameterCollection   OleDbCommand Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph