IDataRecord

public interface IDataRecord

Provides access to the column values within each row for a DataReader, and is implemented by .NET Framework data providers that access relational databases.

Methods

MethodDescription
get(int i)Gets the column located at the specified index.
getFieldCount()Gets the number of columns in the current row.
getFieldType(int i)Gets the java.lang.Class information corresponding to the type of java.lang.Object that would be returned from getValue(int).
getName(int i)Gets the name for the field to find.
getValue(int i)Return the value of the specified field.

get(int i)

public abstract Object get(int i)

Gets the column located at the specified index.

Parameters:

ParameterTypeDescription
iintThe zero-based index of the column to get.

Returns: java.lang.Object - The column located at the specified index as an java.lang.Object.

getFieldCount()

public abstract int getFieldCount()

Gets the number of columns in the current row.

Returns: int - When not positioned in a valid recordset, 0; otherwise, the number of columns in the current record. The default is -1.

getFieldType(int i)

public abstract Class getFieldType(int i)

Gets the java.lang.Class information corresponding to the type of java.lang.Object that would be returned from getValue(int).

Parameters:

ParameterTypeDescription
iintThe index of the field to find.

Returns: java.lang.Class - The java.lang.Class information corresponding to the type of java.lang.Object that would be returned from getValue(int).

getName(int i)

public abstract String getName(int i)

Gets the name for the field to find.

Parameters:

ParameterTypeDescription
iintThe index of the field to find.

Returns: java.lang.String - The name of the field or the empty string (""), if there is no value to return.

getValue(int i)

public abstract Object getValue(int i)

Return the value of the specified field.

Parameters:

ParameterTypeDescription
iintThe index of the field to find.

Returns: java.lang.Object - The java.lang.Object which will contain the field value upon return.