joashivanmoodley / django-pagination

Automatically exported from code.google.com/p/django-pagination
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Pagination does not work on MSSQL 2005 for more than 101 rows #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. On Django connected to MSSQL 2005 put for more than 101 rows to result.
2. It returns "Cannot create new connection because in manual or
distributed transaction mode"
3. Add "MultipleActiveResultSets=true" to connection string and still
return "Cannot create new connection because in manual or distributed
transaction mode"

What version of the product are you using? On what operating system?
Win 2003 server
MSSQL 2005
django-pagination-1.0.4
Python 2.6.1 and Python 2.5.2 (same result)
Django 1.0.2
Newest version of sqlserver_ado 

Brano

Original issue reported on code.google.com by brano.w...@gmail.com on 10 Jan 2009 at 4:59

GoogleCodeExporter commented 8 years ago
django-pagination-1.0.5 the same problem

Original comment by brano.w...@gmail.com on 12 Jan 2009 at 12:09

GoogleCodeExporter commented 8 years ago
so this the way:

This one works well for me (it uses the built-one), but remember not to use {% 
if
object_list %} before pagination tags in your template - the "if" tag evaluates 
the
queryset, that was cause of big overhead in one of my apps..

Original comment by brano.w...@gmail.com on 6 Apr 2009 at 2:10

GoogleCodeExporter commented 8 years ago
I ran into this same problem and it turned out that was doing a {% if 
object_list %}
before the call to paginate, and it caused the "Cannot create new connection 
because
in manual or distributed transaction mode" problem.  I removed the {% if 
object_list
%} and all is well now.

Original comment by hida...@gmail.com on 17 Apr 2009 at 4:44