'Declaration
Public Overrides NotOverridable Property ParameterName As String
public override string ParameterName {get; set;}
public read-write property ParameterName: String; override;
public override function get,set ParameterName : String
'Declaration
Public Overrides NotOverridable Property ParameterName As String
public override string ParameterName {get; set;}
public read-write property ParameterName: String; override;
public override function get,set ParameterName : String
No example is available for C++, JScript or Visual Basic. To view a C# example, click the Language Filter button in the upper-left corner of the page.
MimerCommand command = new MimerCommand(); // // Perform insert with named parameters. // command.CommandText = "INSERT INTO TAB VALUES(:c1,:c2);" command.Parameters.Add("c2", "bar"); command.Parameters.Add("c1", "foo"); // The above code will match the parameter names and do the following: // INSERT INTO TAB VALUES('foo','bar'); // // Perform insert with named parameters that do not match. // command.CommandText = "INSERT INTO TAB VALUES(:c1,:c2);" command.Parameters.Add("c3", "bar"); command.Parameters.Add("c4", "foo"); // The above code will fail to match the parameter names and do the following: // INSERT INTO TAB VALUES('bar','foo'); // as unnamed parameters are read from the collection in the order they appear. // // Perform insert with unnamed parameters. // command.CommandText = "INSERT INTO TAB VALUES(?,?);" command.Parameters.Add("", "foo"); command.Parameters.Add("", "bar"); // The above code will read the parameter collection in the order the parameters appear: // INSERT INTO TAB VALUES('foo','bar'); // // Perform insert with parameters with a specific position. // command.CommandText = "INSERT INTO TAB VALUES(:2,:1);" command.Parameters.Add("", "bar"); command.Parameters.Add("", "foo"); // The above code will read the parameter collection in the order specified in the command text: // INSERT INTO TAB VALUES('foo','bar');
.NET Framework
Version 2.0 or later