This documentation is archived and is not being maintained.

IDataParameter.DbType Property

Gets or sets the DbType of the parameter.

[Visual Basic]
Property DbType As DbType
DbType DbType {get; set;}
__property DbType get_DbType();
__property void set_DbType(DbType);
function get DbType() : DbType;function set DbType(DbType);

Property Value

One of the DbType values. The default is String.


Exception Type Condition
ArgumentOutOfRangeException The property was not set to a valid DbType.


The PrvDbType (where Prv represents the provider-specific prefix) and DbType are linked. Therefore, setting the DbType changes the PrvDbType to a supporting PrvDbType.

For a list of the supported data types, see the appropriate .NET Framework data provider PrvDbType member. For more information, see Using Parameters with a DataAdapter.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

IDataParameter Interface | IDataParameter Members | System.Data Namespace