mirror of
https://github.com/codez0mb1e/resistance.git
synced 2024-11-21 09:52:20 +00:00
Update SQL driver and minor improvements
This commit is contained in:
parent
c60c8fac55
commit
138587cd6b
@ -17,7 +17,7 @@ class ConnectionSettings:
|
||||
database: str
|
||||
username: str
|
||||
password: str
|
||||
driver: str = '{ODBC Driver 17 for SQL Server}'
|
||||
driver: str = '{ODBC Driver 18 for SQL Server}'
|
||||
timeout: int = 30
|
||||
|
||||
|
||||
@ -28,10 +28,10 @@ class AzureDbConnection:
|
||||
def __init__(self, conn_settings: ConnectionSettings, echo: bool = False) -> None:
|
||||
conn_params = urllib.parse.quote_plus(
|
||||
'Driver=%s;' % conn_settings.driver +
|
||||
'Server=tcp:%s,1433;' % conn_settings.server +
|
||||
'Server=tcp:%s.database.windows.net,1433;' % conn_settings.server +
|
||||
'Database=%s;' % conn_settings.database +
|
||||
'Uid=%s;' % conn_settings.username +
|
||||
'Pwd={%s};' % conn_settings.password +
|
||||
'Pwd=%s;' % conn_settings.password +
|
||||
'Encrypt=yes;' +
|
||||
'TrustServerCertificate=no;' +
|
||||
'Connection Timeout=%s;' % conn_settings.timeout
|
||||
|
Loading…
Reference in New Issue
Block a user