For this particular instance, I don't need the port number.
On Thu, Jul 4, 2019 at 11:47 AM Joe Reitman <[email protected]> wrote:
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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
> <https://groups.google.com/d/msgid/django-users/60dae4de-82b0-472c-987d-9fab48c37f0f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Regards,
John B
--
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 [email protected].
To post to this group, send email to [email protected].
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/CAFhYZ6CVS%2B4bJs0OwxK7KbY-mMgurvibpGOcmdFLYC_zJO0d3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.