Platform SDK: Broadcast Architecture

CDatabaseRecordset::GetField

The GetField method returns the value of the specified field from a record in a recordset object. This method is overloaded, and you can use either a LPCTSTR field name or a LONG index number to retrieve the field. C syntax is shown.

Syntax 1

COleVariant GetField(
  LPCTSTR pstrIndex  
);

Parameters 1

pstrIndex
Name of the field to retrieve.

Syntax 2

COleVariant GetField(
  LONG lIndex  
);

Parameters 2

lIndex
Index number of the field to retrieve. For example, if you pass in 3, GetField gets the value of the third field in the record.

Return Values

Returns the value of the specified field.

Requirements

  Windows NT/2000: Unsupported.
  Windows 95/98: Requires Windows 98.
  Header: Declared in dbsets.h.
  Import Library: Use dbsets.lib or dbsetsst.lib.