asp.net.ph

SqlParameter.Precision Property

System.Data.SqlClient Namespace   SqlParameter Class


Sets or retrieves the maximum number of digits for the parameter value.

Syntax


Script SqlParameter.Precision [ = bytes ]

Property Value


bytes The maximum number of digits used to represent the Value of the SqlParameter.

The property is read/write with a default value of 0.

Implements

IDbDataParameter.Precision

Remarks

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

Example

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;
}
  C# VB

See Also

SqlParameter Members   Scale   Size Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph