user2671057
user2671057

Reputation: 1533

Multiple parameters for connection string

I'm using python with sqlalchemy for access my sqlserver database (azure).

I want to access the data with charset=utf8 and with driver also.

This is my conenction string:

connect="mssql+pyodbc_mssql://<user>:<pass>@server/database?charset=utf8?driver=SQL Server Native Client 11.0"

So when the charset is the first - he doesn't take the driver and I can't connect.

And when the driver is first - I have problems with the unicode.

I tried to insert ; or , between them instead of ? but is doesn't work...

What is the right way to config multiple parameters in the connection string?

Please don't suggest to replace driver.

Thank you.

Upvotes: 0

Views: 1036

Answers (1)

Phung Duy Phong
Phung Duy Phong

Reputation: 896

The separator of parameters should be using & as in:

connect="mssql+pyodbc_mssql://<user>:<pass>@server/database?charset=utf8&driver=SQL Server Native Client 11.0"

Upvotes: 2

Related Questions