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
);
- 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.
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 ( ) );
}
Public Sub CreateOleDbParameter ( )
Dim myParam As New OleDbParameter ( "Description", OleDbType.VarChar, _
11, ParameterDirection.Output, True, 0, 0, "Description", _
DataRowVersion.Current, "garden hose" )
Response.Write ( myParam.ToString ( ) )
End Sub |
|
C# |
VB |
OleDbParameter Members OleDbParameter Constructor Overload List
|
|