asp.net.ph

SqlParameter.ParameterName Property

System.Data.SqlClient Namespace   SqlParameter Class


Sets or retrieves the name of the parameter.

Syntax


Script SqlParameter.ParameterName [ = strName ]

Property Value


strName The name the SqlParameter.

The property is read/write with no default value.

Implements

IDataParameter.ParameterName

Remarks

The ParameterName is specified in the form @paramname. You must set ParameterName before executing an SqlCommand that relies on parameters.

Example

The following example initializes an SqlParameter and sets some of its properties.

public void CreateSqlParameter ( ) {
   SqlParameter myParam = new SqlParameter ( "@Description", SqlDbType.VarChar, 100 );
   myParam.Direction = ParameterDirection.Output;
}
  C# VB

See Also

SqlParameter Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph