|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 Ds萝卜 于 2020-3-10 19:31 编辑
警告:
- Warning (from warnings module):
- File "C:\Users\Administrator\Desktop\regr.py", line 1
- import pymssql #引入pymssql模块
- DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
复制代码
python:3.7
源码:
- import pymssql #引入pymssql模块
- def conn():
- connect = pymssql.connect('172.16.78.10', 'sa', '123456', 'WX4') #服务器名,账户,密码,数据库名
- if connect:
- print("连接成功!")
- return connect
- if __name__ == '__main__':
- conn = conn()
复制代码
- C:\Users\Administrator>pip list
- Package Version
- ---------- -------
- pip 20.0.2
- pymssql 2.1.4
- setuptools 39.0.1
复制代码
|
|