Item Method (ODBCErrors Collection)

Applies To

ODBCErrors collection object.

Description

Returns a single ODBCError object from an ODBCErrors collection.

Syntax

expression.Item(Index)

expression Required. An expression that returns an ODBCErrors object.

Index Required Long. The index number of the ODBCError object.

Example

This example displays an ODBC error.

Set er = Application.ODBCErrors.Item(1)
MsgBox "The following error occurred:" & _
    er.ErrorString & " : " & er.SqlState