SqlCeParameter.ParameterName Property

Gets or sets the name of the SqlCeParameter.

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

public override string ParameterName { get; set; }

Property Value

Type: System.String
The name of the SqlCeParameter. The default is an empty string.



The .NET Compact Framework Data Provider for SQL Server Compact uses positional parameters that are marked with a question mark (?) instead of named parameters. Although not required, it is recommended to set ParameterName to a string beginning with '@'.

The following example creates a SqlCeParameter and sets the ParameterName property.

SqlCeParameter param = new SqlCeParameter();
param.ParameterName = "@Description";