Parameter.GetDatabaseType Parameter.GetDatabaseType Parameter.GetDatabaseType Parameter.GetDatabaseType Method

定義

取得 DbType 值,該值等於目前 Parameter 執行個體的 CLR 型別。Gets the DbType value that is equivalent to the CLR type of the current Parameter instance.

public:
 System::Data::DbType GetDatabaseType();
public System.Data.DbType GetDatabaseType ();
member this.GetDatabaseType : unit -> System.Data.DbType
Public Function GetDatabaseType () As DbType

傳回

DbType 值,該值等於目前 Parameter 執行個體的 CLR 型別。The DbType value that is equivalent to the CLR type of the current Parameter instance.

例外狀況

DbType 屬性已設為 Object 以外的值。The DbType property is already set to a value other than Object.

備註

屬性必須尚未設定,或必須設定為ObjectDbTypeThe DbType property must not already have been set, or must be set to Object. 只有在設定了 CLR 類型,但DbType屬性不是時,才會使用這個方法。This method is intended for use only when the CLR type is set but the DbType property is not.

適用於