I was unable to use the ADO.NET destination to insert data into my mysql database.
For the ADO.NET Destination to work properly, the MySQL database needs to have the
ANSI_QUOTES SQL_MODE option enabled. This option can be
enabled globally, or for a particular session. To enable it for a single session:
- Create an ADO.NET Connection Manager which uses the ODBC driver
- Set the connection manager’s RetainSameConnection property to True
- Add
an Execute SQL Task before your data flow to set the SQL_MODE – Ex. set
sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ANSI_QUOTES'
- Make sure that your Execute SQL Task and your ADO.NET Destination are using the same connection manager.
Setting
the RetainSameConnection property to True will ensure that your Execute
SQL Task and ADO.NET Destination are in the same session.