简体   繁体   English

将数据从文本文件导入MySQL时,SSIS包中出现错误

[英]Error in SSIS package while importing data from text file into MySQL

I created a package in SSIS. 我在SSIS中创建了一个程序包。 source is a text file and destination is MySQL. 源是文本文件,目标是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" “ [ADO NET Destination [195]]错误:在数据插入期间发生了异常,从提供程序返回的消息是:ERROR [42000] [MySQL] [ODBC 5.2(w)驱动程序] [mysqld-5.6.13-log ]您的SQL语法有误;请查看与您的MySQL服务器版本相对应的手册,以找到在附近使用的正确语法”

MySQL is not an ADO.NET database. MySQL不是ADO.NET数据库。 You need to use an OleDB connection (or ODBC, I forget which). 您需要使用OleDB连接(或ODBC,我忘记了)。

您必须在ODBC数据库上执行此SQL脚本,以忽略引起问题的双引号:

set @@global.sql_mode ='ANSI';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM