Open GoogleCodeExporter opened 8 years ago
I think passing connection into __init__() fixes this
Original comment by bench...@gmail.com
on 18 Sep 2012 at 11:27
This is a regression from Django 1.4 which has not been pulled from any patch
maintainer. avidal has forked the project on github and as much as I hate
seeing forks, django-pyodbc has not been updated in almost a year including
zero bug fixes on trunk. The project should really be turned over to additional
maintainers if no one is going to update trunk for modern Django versions.
Original comment by bj.car...@gmail.com
on 20 Sep 2012 at 9:40
Oops... you can find avidal's patches here:
https://github.com/avidal/django-pyodbc
Original comment by bj.car...@gmail.com
on 20 Sep 2012 at 9:40
I was getting the same error (in addition to another error where the parameter
count was not correct).
Here are the changes I made to get resolve these errors.
--- sql_server/pyodbc/operations.py (revision 191)
+++ sql_server/pyodbc/operations.py (working copy)
@@ -7,7 +7,8 @@
class DatabaseOperations(BaseDatabaseOperations):
compiler_module = "sql_server.pyodbc.compiler"
def __init__(self, connection):
- super(DatabaseOperations, self).__init__()
+ super(DatabaseOperations, self).__init__(self)
+
self.connection = connection
self._ss_ver = None
@@ -52,7 +53,7 @@
if lookup_type == 'day':
return "Convert(datetime, Convert(varchar(12), %s, 112))" % field_name
- def field_cast_sql(self, db_type):
+ def field_cast_sql(self, db_type, internal_type):
"""
Given a column type (e.g. 'BLOB', 'VARCHAR'), returns the SQL necessary
to cast it before using it in a WHERE statement. Note that the
Original comment by Terry.Dr...@gmail.com
on 14 Jun 2013 at 3:51
Original issue reported on code.google.com by
lombaard...@gmail.com
on 17 Jul 2012 at 1:41