带有SQL的Python
设置PYODBC
确保一切正常的最后一件事...
建立连接
就像Azure Data Studio这样的编辑器一样,您需要登录详细信息才能连接到数据库
# as is was in Azure studio, we need login details to connect to the db
server = 'xx.xxx.xxx.xx' # the server's ip
database = 'Northwind'
username = 'username'
password = '______'
docker_Northwind = pyodbc . connect ( 'DRIVER={ODBC Driver 17 for SQL Server};SERVER=' + server + ';DATABASE=' + database + ';UID
评论0
最新资源