Oracle Objects for OLE C++ Class Library
Release 8.1.7

Part Number A85258-01

Library

Product

Contents

GetFieldPrecision Method

Applies To

ODynaset

Description

This method returns the precision of the number field.

Usage

int GetFieldPrecision(int index) const

int GetFieldPrecision(const char *fieldname) const

Arguments

index
The 0-based index of the field. The index is the position of the field in the SQL query that created the current record set.
fieldname
The name of the field, as expressed in the SQL query
Remarks

In an Oracle database, one column data type is number. If a field has a data type of number, it has two additional attributes: scale and precision. The precision is the total number of decimal digits. In Oracle this can range from 1 to 38.

Precision has no meaning for non-number fields.

Return Value

The precision of the number field. On error (which includes calling this method on a non-number field) a 0 is returned.


 
Oracle
Copyright copy; 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents