System.Data.SqlClient Namespace SqlParameter Class
Sets or retrieves the number of decimal places of the parameter value.to which Value is resolved.
Script |
SqlParameter.Scale [ = bytes ] |
bytes |
The number of decimal places to which the Value of the SqlParameter is resolved. |
The property is read/write with a default value of 0.
IDbDataParameter.Scale
The Scale property is only used for numeric and decimal input parameters.
The following example initializes an SqlParameter and sets some of its properties.
public void CreateSqlParameter ( ) {
SqlParameter myParam = new SqlParameter ( "@Specs", SqlDbType.Decimal );
myParam.Value = 3.1416;
myParam.Precision = 8;
myParam.Scale = 4;
}
Public Sub CreateSqlParameter ( )
Dim myParam As New SqlParameter ( "@Specs", SqlDbType.Decimal )
myParam.Value = 3.1416
myParam.Precision = 8
myParam.Scale = 4
End Sub |
|
C# |
VB |
SqlParameter Members
| Precision Size