_Application.ODBCErrors property

Returns an ODBCErrors collection that contains all the ODBC errors generated by the most recent query table or PivotTable report operation.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

ODBCErrors ODBCErrors { get; }

If there’s more than one query running at the same time, the ODBCErrors collection contains the ODBC errors from the query that’s finished last.