import pymssql
import logging
def createCursor(serverAddress, userName, password, dataBase):
# create connection and cursor
conn = pymssql.connect(serverAddress, userName, password, dataBase, charset = "UTF-8")
logging.info("sqlServer connection Successfully Created. ")
cursor = conn.cursor()
logging.info("cursor Successfully Created. ")
return conn, cursor
相关文章
- 10-05createCursor.py