>
> Hi John,
>

Excellent suggestion.  Using python shell and pyodbc I was able to connect 
and perform several simple queries.  Just worked,  no heroics needed. I'm 
fairly sure my problem lies in django_pyodbc,  it is making sure the 
connection to the database is sane. I'm not sure the support for django 1.9 
is fully incorporated.

Here is my session with pyodbc:
PS F:\my_db\my_db> .\env\Scripts\Activate.ps1
(env) PS F:\my_db\my_db> python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyodbc
>>> cnxn = pyodbc.connect('DRIVER={SQL 
Server};SERVER=***;PORT=1433;DATABASE=my_db;UID=*****;PWD=*****')
>>> cursor = cnxn.cursor()
>>> cursor.execute("select name,siteid from cpd_customer")
<pyodbc.Cursor object at 0x00000000028003F0>
>>> row=cursor.fetchone()
>>> row
('A***, *****', '000****1')
>>> row=cursor.fetchone()
>>> row
('A******', '0011****1')
>>> row = cursor.fetchone()
>>> row[0]
'A******'
>>> row[1]
'0011****1'
>>> row.name
'A******'
>>> row.siteid
'0011****1'
>>>


-- 
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/6bbc3cdb-61e6-4c12-af4f-fdb7e1ee1d66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to