I imported external data into an Excel 2010 spreadsheet coming from aSQL Server 2005 query. The query throws a conversion error in one of its rows that makes the database returns rows until the error is found. The database throws an exception but the Excel does not show any alert to warn about the sql error: it just shows the first rows retrieved.
This happens when the workbook's external data connection is an Office Data Connection type. When the connection type is aDatabase Query (e.g. done through System ODBC) an alert message is shown to warn about the error.
Is there any way to make the excel warn about database errors when inserting/refreshing external data from anOffice Data Connection type?
Test example - View with a conversion error in one of its rows:
CREATE VIEW [dbo].[vError] AS Select 10 as Boolean Union All Select Cast('Hi error!' As Bit) As Boolean Union All Select 20 as Boolean -- This query only returns the first row, throws a conversion error and stops retrieving rows: -- Select * From [dbo].[VError]
This query in an Excel's Office Data Connection type only inserts in the spreadsheet the first row and it does not warn about the conversion error:
Select * From [dbo].[VError]