ADO Precision Attribute

Definition and Usage

The Precision attribute can be set or returned as a byte value, which represents the maximum number of digits allowed when representing the value of a Parameter or Field object.

Syntax

objectname.Precision
Object Description of Precision attribute
Field

For the Field object, Precision is typically read-only. However, for a new Field object added to the Fields collection of the Record, Precision is read/write only when the Field's Value attribute is specified and the data provider successfully adds the new Field by calling the Update method of the Fields collection.

Parameter For the Parameter object, the Precision property has read/write access.

Example

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select * from orders", conn
response.write(rs.Fields(0).Precision)
rs.Close
conn.close
%>