Skip Headers

Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 1 (10.1)

Part Number B10119-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

GetFieldScale Method

Applies To

ODynaset

Description

This method returns the scale of the number field.

Usage

int GetFieldScale(int index) const

int GetFieldScale(const char *fieldname) const

Arguments
Description
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 scale is the number of decimal digits to the right of the decimal point. It can range (in Oracle) from -84 to 127.

Scale has no meaning for non-number fields.

Return Value

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