System.Data.OleDb Namespace OleDbParameter Class
Initializes a new instance of the OleDbParameter class with the parameter name and data type.
[ VB ]
Overloads Public Sub New ( _
ByVal name As String, _
ByVal dataType As OleDbType _
)
[ C# ]
public OleDbParameter (
string name,
OleDbType dataType
);
[ C++ ]
public: OleDbParameter (
String* name,
OleDbType dataType
);
[ JScript ]
public function OleDbParameter (
name : String,
dataType : OleDbType
);
- name
- The name of the parameter to map.
- dataType
- One of the OleDbType values.
The Size and Precision are inferred from the OleDbType parameter.
The following example initializes an OleDbParameter and sets some of its properties.
public void CreateOleDbParameter ( ) {
OleDbParameter myParam = new OleDbParameter ( "Description", OleDbType.VarChar );
myParam.Direction = ParameterDirection.Output;
}
Public Sub CreateOleDbParameter ( )
Dim myParam As New OleDbParameter ( "Description", OleDbType.VarChar )
myParam.Direction = ParameterDirection.Output
End Sub |
|
C# |
VB |
OleDbParameter Members OleDbParameter Constructor Overload List