ERROR: unknown command '\n' Can't connect to the server 网上查询了,多少是编码问题引起,一边是UTF8一边是GBK,反复调整MY.CNF配置文件可搞定. # The following options will be passed to all MySQL clients[client]#password = your_passwordport = 3306socket = /tmp/mysql.sockdefault-characte
最近用写个winform程序想用excel 文件导入数据库中,网上寻求办法,找到了这个经过尝试可以使用. 方法一: 实现在c#中可高效的将excel数据导入到sqlserver数据库中,很多人通过循环来拼接sql,这样做不但容易出错而且效率低下,最好的办法是使用bcp,也就是System.Data.SqlClient.SqlBulkCopy 类来实现. using System; using System.Collections.Generic; using System.ComponentMo
最近用写个winform程序想用excel 文件导入数据库中,网上寻求办法,找到了这个经过尝试可以使用. 方法一: 实现在c#中可高效的将excel数据导入到sqlserver数据库中,很多人通过循环来拼接sql,这样做不但容易出错而且效率低下,最好的办法是使用bcp,也就是System.Data.SqlClient.SqlBulkCopy 类来实现. using System; using System.Collections.Generic; using System.ComponentMo