_Application.ODBCErrors Property
Office 2010
Returns an ODBCErrors collection that contains all the ODBC errors generated by the most recent query table or PivotTable report operation.
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
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.