SqlParameter::DbType Property

 

Gets or sets the SqlDbType of the parameter.

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

public:
property DbType DbType {
	virtual DbType get() override;
	virtual void set(DbType value) override;
}

Property Value

Type: System.Data::DbType

One of the SqlDbType values. The default is NVarChar.

The SqlDbType and DbType are linked. Therefore, setting the DbType changes the SqlDbType to a supporting SqlDbType.

For a list of the supported data types, see the appropriate SqlDbType member. For more information, see DataAdapter Parameters.

The following example creates a SqlParameter and sets some of its properties.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: