Don't you need to assign a port number?

On Wednesday, July 3, 2019 at 6:52:35 PM UTC-5, John Burke wrote:
>
> Trying to connect to SQL Server from Django
>
> DATABASES = {
>     'default': {
>         'ENGINE': 'sql_server.pyodbc',
>         'NAME': 'dbname',
>         'HOST': 'hostname',
>         'PORT': '',
>         'USER': 'user',
>         'PASSWORD': 'password',
>         'OPTIONS': {
>             'driver': 'ODBC Driver 13 for SQL Server',
>         },
>     }
> }
>
>
> I get the following error:
> File "...\venv\lib\site-packages\sql_server\pyodbc\base.py", line 362, in 
> init_connection_state
>     val = cursor.execute('SELECT SYSDATETIME()').fetchone()[0]
> ValueError: hour must be in 0..23
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/60dae4de-82b0-472c-987d-9fab48c37f0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to