OleDbParameter.ParameterName Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the name of the OleDbParameter.

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

public override string ParameterName { get; set; }

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: