使用pymssql 将utf8 编码的txt文本文件,插入到SQL SERVER表的字段中,需要解码
SQL Server 字段名为nvarchar(MAX) .
def update_article():
'''
update data ,from txt to SQL Server
'''
server = '192.168.100.1'
user = 'sa'
password = 'password'
db = 'DB'
#
conn = pymssql.connect(server, user, password, db,charset="utf8")
cursor = conn.cursor()