Using sqlalchemy 1.0.4, python 3.4.3 and pyodbc 3.0.10.
I want to create a database with raw sql for the MS SQL server.
c = "mssql+pyodbc://sa:admin11$$@PROIMT01\SQLEXPRESS/master?driver=SQL+Server+Native+Client+11.0"
e = create_engine(c,echo=True)
con = e.connect()
con.execute("CREATE DATABASE xb;")
con.close()
But the above code returns an error "create database statement not allowed within multi-statement transaction".
I tried con.execute("commit") before the creation script, but it does nothing.
UPDATE
If i set the driver ?driver=SQL+SERVER it works!?