I have an SSIS package that is connecting to a database using an ODBC connection.
The connection is setup and tests successfully. If I create a simple Execute SQL Task and run:
select top 1000 *
from
[MyTableData] where DateEntered >= GETDATE()-45
it runs fine. If I run:
delete
from
[MyTableData] where DateEntered >= GETDATE()-45
Then I get this:
failed with the following error: "Error HRESULT E_FAIL has been returned from a call to a COM component.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Any ideas? The connection must be fine because it will do a select just fine, but it won't delete.