Maurizio Faccin
unread,Mar 22, 2021, 10:58:50 AM3/22/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hello,
I have a problem tryng to connect Django with a SQL Server 2012 runnig
on my pc.
I installed pyodb package and this is my connection parameters in
settings.py
DATABASES = {
'default': {
'ENGINE': "sql_server.pyodbc",
'NAME': "CD",
'USER': "sa",
'PASSWORD': "secret",
'HOST': "NB30",
'PORT': "1433",
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
},
},
}
I get this error:
django.db.utils.InterfaceError: ('28000', "[28000] [Microsoft][ODBC
Driver 13 for SQL Server][SQL Server]Login failed for user 'user'.
(18456) (SQLDriverConnect); [28000] [Microsoft][ODBC Driver 13 for SQL Ser
ver]Attributo di stringa di connessione non valido. (0); [28000]
[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Login failed for
user 'user'. (18456); [28000] [Microsoft][ODBC Driver 13 for SQL Server]A
ttributo di stringa di connessione non valido. (0)")
I tried to use the parameters above in a python script and works correctly.
What I can do to resolve this issue?
Thank you in advance
Maurizio Faccin