GetFieldType
This method returns the type of the specified column.
Declaration
// C#
public override Type GetFieldType(int index);Parameters
-
indexThe zero-based column index.
Return Value
The type of the default .NET type of the column.
Implements
IDataRecord
Exceptions
InvalidOperationException - The reader is closed, or the specified column is a UDT but no registered custom type mapping exists for the UDT.
IndexOutOfRangeException - The column index is invalid.
Remarks
GetFieldType returns a type that corresponds to the value that the application obtains after invoking the GetValue accessor or Item property on the OracleDataReader. For example, if the column is a string, this method returns a .NET Type object for a .NET string.
If the attribute is a UDT, this method may return either of the following:
-
A .NET Type of the custom type if a custom type mapping exists for the Oracle object or collection.
-
A .NET Type of string if the column is an Oracle
REF.
For VECTOR columns, this method returns a numeric array or byte array type based on the VECTOR numeric format. BINARY vectors can only return a .NET byte[]. If the VECTOR numeric format is '*', then this method returns type of Array. For sparse VECTOR columns, this method returns type of string.