OracleParameter.OracleType 属性


获取或设置参数的 OracleTypeGets or sets the OracleType of the parameter.

 property System::Data::OracleClient::OracleType OracleType { System::Data::OracleClient::OracleType get(); void set(System::Data::OracleClient::OracleType value); };
public System.Data.OracleClient.OracleType OracleType { get; set; }
public System.Data.OracleClient.OracleType OracleType { get; set; }
member this.OracleType : System.Data.OracleClient.OracleType with get, set
Public Property OracleType As OracleType


OracleType 值,它是该参数的 OracleTypeAn OracleType value that is the OracleType of the parameter. 默认值为 VarCharThe default is VarChar.



OracleTypeDbType 已链接。The OracleType and DbType are linked. 因此,设置 DbType 会将 OracleType 更改为支持的 OracleTypeTherefore, setting the DbType changes the OracleType to a supporting OracleType.

可以通过设置 Value来推断参数的 DbTypeOracleTypeSize 属性。The DbType, OracleType, and Size properties of a parameter can be inferred by setting Value. 因此,您不需要指定它们。Therefore, you are not required to specify them. 但是,它们不 OracleParameter 属性设置公开。However, they are not exposed in OracleParameter property settings. 例如,如果已推断出参数的大小,则在语句执行后 Size 不包含推断值。For example, if the size of the parameter has been inferred, Size does not contain inferred value after statement execution. 对于 String 数据类型,默认值为 VarCharFor String data types the default is VarChar.

有关支持的数据类型的列表,请参阅相应的 OracleType 成员。For a list of the supported data types, see the appropriate OracleType member. 有关详细信息,请参阅DataAdapter 参数For more information, see DataAdapter Parameters.