asp.net.ph

OleDbParameter Constructor ( String, OleDbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object )

System.Data.OleDb Namespace   OleDbParameter Class


Initializes a new instance of the OleDbParameter class with the parameter name, data type, width, source column name, parameter direction, numeric precision, and other properties.

[ VB ]
Overloads Public Sub New ( _
   ByVal parameterName As String, _
   ByVal dbType As OleDbType, _
   ByVal size As Integer, _
   ByVal direction As ParameterDirection, _
   ByVal isNullable As Boolean, _
   ByVal precision As Byte, _
   ByVal scale As Byte, _
   ByVal srcColumn As String, _
   ByVal srcVersion As DataRowVersion, _
   ByVal value As Object _
)

[ C# ]
public OleDbParameter (
   string parameterName,
   OleDbType dbType,
   int size,
   ParameterDirection direction,
   bool isNullable,
   byte precision,
   byte scale,
   string srcColumn,
   DataRowVersion srcVersion,
   object value
);

[ C++ ]
public: OleDbParameter (
   String* parameterName,
   OleDbType dbType,
   int size,
   ParameterDirection direction,
   bool isNullable,
   unsigned char precision,
   unsigned char scale,
   String* srcColumn,
   DataRowVersion srcVersion,
   Object* value
);

[ JScript ]
public function OleDbParameter (
   parameterName : String,
   dbType : OleDbType,
   size : int,
   direction : ParameterDirection,
   isNullable : Boolean,
   precision : Byte,
   scale : Byte,
   srcColumn : String,
   srcVersion : DataRowVersion,
   value : Object
);

Parameters

parameterName
The name of the parameter.
dbType
One of the OleDbType values.
size
The width of the parameter.
direction
One of the ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
precision
The total number of digits to which Value is resolved.
scale
The number of decimal places to which Value is resolved.
srcColumn
The name of the source column.
srcVersion
One of the DataRowVersion values.
value
An Object that is the value of the OleDbParameter.

Example

The following example initializes an OleDbParameter and displays the ParameterName.

public void CreateOleDbParameter ( ) {
   OleDbParameter myParam = new OleDbParameter ( "Description", OleDbType.VarChar,
      11, ParameterDirection.Output, true, 0, 0, "Description",
      DataRowVersion.Current,"garden hose" );
   Response.Write ( myParam.ToString ( ) );
}
  C# VB

See Also

OleDbParameter Members   OleDbParameter Constructor Overload List 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