ADO NumericScale 和 Precision 属性示例 (VB)ADO NumericScale and Precision properties example (VB)
09/18/2015
本文内容
适用于:Access 2013、Office 2013Applies to: Access 2013, Office 2013
本示例使用 NumericScale 和 Precision 属性显示 Pubs 数据库的 Discounts(折扣)表中字段的数字小数位数和精确度。This example uses the NumericScale and Precision properties to display the numeric scale and precision of fields in the Discounts table of the Pubs database.
'BeginNumericScaleVB
'To integrate this code
'replace the data source and initial catalog values
'in the connection string
Public Sub Main()
On Error GoTo ErrorHandler
' connection and recordset variables
Dim rstDiscounts As ADODB.Recordset
Dim Cnxn As ADODB.Connection
Dim fldTemp As ADODB.Field
Dim strCnxn As String
Dim strSQLDiscounts As String
' Open connection