需要帮助将Flask-SQLAlchemy连接到MS SQL Server 2008R2

时间:2017-06-07 04:53:51

标签: python tsql flask-sqlalchemy

难以获得与数据库的正确连接:

ship.simdPosition = float3(0, 0, -0.5) 
// half a meter in front of the *initial* camera position
myARSCNView.scene.rootNode.addChildNode(ship)

1 个答案:

答案 0 :(得分:0)

这对我有用:

import urllib
params = urllib.parse.quote_plus("DRIVER={SQL Server};SERVER=SERVER_NAME;DATABASE=DB;UID=user;PWD=password")
engine = create_engine("mssql+pyodbc:///?odbc_connect=%s" % params)