import pypyodbc
try:
conn=pypyodbc.connect(
"DSN=MCC;"
"UID=SYSTEM;"
"PWD=FLSCADA;"
)
if conn:
print("数据库连接成功。")
except:
print('数据库连接失败!')
import pypyodbc
try:
conn=pypyodbc.connect(
"DSN=MCC;"
"UID=SYSTEM;"
"PWD=FLSCADA;"
)
if conn:
print("数据库连接成功。")
except:
print('数据库连接失败!')
本文标题:2019-05-28 ODBC读取
本文链接:https://www.haomeiwen.com/subject/mezdtctx.html
网友评论