System.Data.OleDb Namespace OleDbParameter Class
Initializes a new instance of the OleDbParameter class with the parameter name and value.
[ VB ]
Overloads Public Sub New ( _
ByVal name As String, _
ByVal value As Object _
)
[ C# ]
public OleDbParameter (
string name,
object value
);
[ C++ ]
public: OleDbParameter (
String* name,
Object value
);
[ JScript ]
public function OleDbParameter (
name : String,
value : Object
);
- name
- The name of the parameter to map.
- value
- The value of the new OleDbParameter object.
When you specify an Object in the value parameter, the OleDbType is inferred from the .NET Framework type of the Object.
The following example initializes an OleDbParameter and sets some of its properties.
public void CreateOleDbParameter ( ) {
OleDbParameter myParam = new OleDbParameter ( "Category", "Beverages" );
myParam.Direction = ParameterDirection.Output;
}
Public Sub CreateOleDbParameter ( )
Dim myParam As New OleDbParameter ( "Category", "Beverages" )
myParam.Direction = ParameterDirection.Output
End Sub |
|
C# |
VB |
OleDbParameter Members OleDbParameter Constructor Overload List