Parameter.GetDatabaseType Method

Definition

Gets the DbType value that is equivalent to the CLR type of the current Parameter instance.

C#
public System.Data.DbType GetDatabaseType ();

Returns

The DbType value that is equivalent to the CLR type of the current Parameter instance.

Exceptions

The DbType property is already set to a value other than Object.

Remarks

The DbType property must not already have been set, or must be set to Object. This method is intended for use only when the CLR type is set but the DbType property is not.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1