Parameter.GetDatabaseType 方法

定義

取得 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

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.

備註

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

適用於