python--pymssql连接mssql

import pymssql

if __name__ == "__main__":
    
    
    conn = pymssql.connect(host='192.168.1.111', user='sa', password='password', database='Northwind')
    cur = conn.cursor()
    
    
    cur.execute('select EmployeeID,BirthDate,City from Employees')
    row = cur.fetchone()
    while row:
        print "ID=%d, Name=%s,city=%s" % (row[0], row[1],row[2])
        row = cur.fetchone()

    
   
    conn.close()

 

l连接正常,速度不慢,就1个问题,ntext,nvarchar不得行,出错,找了找,windows的c库问题,解决办法9009le一下去吧

你可能感兴趣的:(C++,c,windows,python,C#)