In the python shell (python 2.7, django 1.6, Windows 8), I'm trying to execute a simple query against one of my table in SQL Server 2008 (engine=django_mssql):
connection.cursor.execute("SELECT * from mymodel_mytable")
The result is None. The connection is working since a simple get :
Mymodel.objects.get(pk=1)
returns the expected row. If I do the same in another shell (Ubuntu, engine=django_pyodbc), it returns the expected pyodbc_Cursor object on which I can fetch the rows.
Where am I wrong? Please, help! Regards, Patrick
EDIT: my DATABASES dict in settings is:
DATABASES = {
'default': {
'ENGINE': "sqlserver_ado",
'HOST': "myhost,myport",
'USER': "myuser",
'PASSWORD': "mypass",
'NAME': "myDB",
'OPTIONS': {
'provider': "SQLNCLI10",
'extra_params': "DataTypeCompatibility=80;MARS Connection=True;"
},
'COMMAND_TIMEOUT': 7200,
}
}