OleDbParameter::ParameterName Property

 

Gets or sets the name of the OleDbParameter.

Namespace:   System.Data.OleDb
Assembly:  System.Data (in System.Data.dll)

public:
property String^ ParameterName {
	virtual String^ get() override;
	virtual void set(String^ value) override;
}

Property Value

Type: System::String^

The name of the OleDbParameter. The default is an empty string ("").

The OLE DB .NET Provider uses positional parameters that are marked with a question mark (?) instead of named parameters.

The following example creates an OleDbParameter and sets some of its properties.

[Visual Basic]

Public Sub CreateOleDbParameter()
    Dim parameter As New OleDbParameter("Description", OleDbType.VarChar, 88)
    parameter.Direction = ParameterDirection.Output
End Sub 'CreateOleDbParameter

[C#]

public void CreateOleDbParameter() 
 {
    OleDbParameter parameter = new OleDbParameter("Description", OleDbType.VarChar, 88);
    parameter.Direction = ParameterDirection.Output;
 }

.NET Framework
Available since 1.1
Return to top
Show: