Routines (alphabetical) > Object Classes > Miscellaneous Object Classes > IDLdbRecordset::GetField

# IDLdbRecordset::GetField

Use the IDLdbRecordset::GetField function method to get the value of a field from the current record in the recordset.

## Syntax

value = RSobj -> [IDLdbRecordset::]GetField(iFieldNumber [, IS_NULL=variable] [, NULL_VALUE=variable] )

## Return Value

Returns the specified field value or if the value of the field is NULL (as defined by SQL) a null value (zero or an empty string) is returned.

## Arguments

### iFieldNumber

The number of the field for which the value will be returned. Field numbers have a range of 0 <= n < number of fields.

## Keywords

### IS_NULL

Set this keyword equal to a named variable that will contain 1 (one) if the ODBC system returns a NULL value, or 0 (zero) if the value is non-NULL.

### NULL_VALUE

Set this keyword equal to the value that should be returned by the GetField method if the value of the requested field is considered to be NULL by the ODBC system.

## Version History

5.0 | Introduced