Share via


SqlCeParameter.Precision Property

Gets or sets the maximum number of digits used to represent the Value property.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

Syntax

'Declaration
Public Property Precision As Byte
    Get
    Set
'Usage
Dim instance As SqlCeParameter
Dim value As Byte

value = instance.Precision

instance.Precision = value
public byte Precision { get; set; }
public:
property unsigned char Precision {
    unsigned char get ();
    void set (unsigned char value);
}
member Precision : byte with get, set
function get Precision () : byte
function set Precision (value : byte)

Property Value

Type: System.Byte
The maximum number of digits used to represent the Value property. The default value is 0.

Remarks

The Precision property is only used for decimal and numeric input parameters.

Examples

The following example creates a SqlCeParameter and sets the Precision property.

Dim param As New SqlCeParameter("@Price", SqlDbType.Decimal)
param.Value = 3.1416
param.Precision = 8
param.Scale = 4
SqlCeParameter param = new SqlCeParameter("@Price", SqlDbType.Decimal);
param.Value = 3.1416;
param.Precision = 8;
param.Scale = 4;

See Also

Reference

SqlCeParameter Class

System.Data.SqlServerCe Namespace

Scale

Size