OdbcParameter::Precision Property
Gets or sets the number of digits used to represent the Value property.
Assembly: System.Data (in System.Data.dll)
public: property unsigned char Precision { virtual unsigned char get() sealed; virtual void set(unsigned char value) sealed; }
Property Value
Type: System::ByteThe maximum number of digits used to represent the Value property. The default value is 0, which indicates that the data provider sets the precision for Value.
Implements
IDbDataParameter::PrecisionSetting this property to a value other than the value in the database depends on the implementation of the data provider and may return an error code, truncate, or round data.
The Precision property only affects parameters whose OdbcType is Decimal or Numeric. For other data types, Precision is ignored.
Note |
|---|
Use of this property to coerce data passed to the database is not supported. To round, truncate, or otherwise coerce data before passing it to the database, use the Math class that is part of the System namespace prior to assigning a value to the parameter's Value property. |
The following example creates an OdbcParameter and sets some of its properties.
Available since 1.1
