Skip Headers
Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 2 (10.2)

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

GetFieldCount Method

Applies To

ODynaset

Description

This method returns the number of fields in each record.

Usage

int GetFieldCount(void) const

Return Value

The number of fields in each record; 0 on error.

Example

This example demonstrates GetFieldCount.

// open a database

ODatabase odb("ExampleDB", "scott", "tiger");

// open a dynaset

ODynaset dyn(odb, "select empno, ename, sal, comm from datatable");

// how many fields was that?

int nfields = dyn.GetFieldCount();

// nfields is 4