Search found 1 match

by kamil.frankiewicz
Tue 31 Jul 2018 08:59
Forum: ODBC Drivers
Topic: SSIS Execute SQL Task Error with MySQL ODBC Connection
Replies: 8
Views: 30308

Re: SSIS Execute SQL Task Error with MySQL ODBC Connection

same problem here.

steps to reproduce:

1) In SSIS create Execute SQL Task with ODBC connection using devart driver.

2) configure this Task with:

SQLSourceType: Direct input
ResultSet: none

SQLStatement:

UPDATE main_table a
INNER JOIN staging_table b ON a.varchar_column = b.varchar_column
SET a.col1 = b.col1, a.col2 = b.col2, (....)
WHERE a.hash_column = b.hash_column

This task WORKS when there are data that satisfy [a.varchar_column = b.varchar_column] condition.

The problem occurs ONLY WHEN THERE IS NOTHING TO UPDATE.
1) When staging_table is empty
2) or has rows that don't match [a.varchar_column = b.varchar_column]

you get:
[Execute SQL Task] Error: Executing the query "UPDATE main_table a INNER JOIN staging_table b ON a.varcha..." 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.