asp.net.ph

SqlParameter Constructor

System.Data.SqlClient Namespace   SqlParameter Class


Initializes a new instance of the SqlParameter class.

Overload List

1. Initializes a new instance of the SqlParameter class.

2. Initializes a new instance of the SqlParameter class with the parameter name and value.

3. Initializes a new instance of the SqlParameter class with the parameter name and data type.

4. Initializes a new instance of the SqlParameter class with the parameter name, data type, and width.

5. Initializes a new instance of the SqlParameter class with the parameter name, data type, width, and source column name.

6. Initializes a new instance of the SqlParameter class with the parameter name, data type, width, source column name, parameter direction, numeric precision, and other properties.


Example

The following example initializes an SqlParameter and displays the ParameterName.

NOTE: This example shows how to use one of the overloaded versions of the SqlParameter constructor. For other examples that may be available, see the individual overload topics.

public void CreateSqlParameter ( ) {
   SqlParameter myParam = new SqlParameter ( "@Description", SqlDbType.VarChar,
      100, ParameterDirection.Output, true, 0, 0, "Description",
      DataRowVersion.Current,"garden hose" );
   Response.Write ( myParam.ToString ( ) );
}
  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