问题
I created a package in SSIS. source is a text file and destination is MySQL. When I am trying to run the package, I am getting the following error.
"[ADO NET Destination [195]] Error: An exception has occurred during data insertion, the message returned from the provider is: ERROR [42000] [MySQL][ODBC 5.2(w) Driver][mysqld-5.6.13-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near"
回答1:
MySQL is not an ADO.NET database. You need to use an OleDB connection (or ODBC, I forget which).
回答2:
You have to execute this SQL script on the ODBC database to ignore double quotes which is causing the problem:
set @@global.sql_mode ='ANSI';
来源:https://stackoverflow.com/questions/20976745/error-in-ssis-package-while-importing-data-from-text-file-into-mysql