I'm using:
python 2.5.4
ibm_db-1.0-py2.5
ibm_db_django-0.1.4-py2.5
django 1.1
DB2/AIX64 SQL09054
models.py:
from django.db import models
class TestModel(models.Model):
testField = models.IntegerField()
admin.py:
from inner.testapp.models import TestModel
from django.contrib import admin
admin.site.register(TestModel)
To repeat the error:
python manage.py startapp testapp
python manage.py syncdb
python manage.py runserver
Goto test model:
http://localhost:8000/admin/testapp/testmodel/
Add one entry
View the entry:
http://localhost:8000/admin/testapp/testmodel/1/
Click on history:
http://localhost:8000/admin/testapp/testmodel/1/history/
Error:
TemplateSyntaxError at /admin/testapp/testmodel/1/history/
Caught an exception while rendering: ibm_db_dbi::ProgrammingError:
[IBM][CLI Driver][DB2/AIX64] SQL0401N The data types of the operands
for the operation "=" are not compatible. SQLSTATE=42818\r
SQLCODE=-401
Original Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\django\template\debug.py", line
71, in render_node
result = node.render(context)
File "C:\Python25\Lib\site-packages\django\template\defaulttags.py",
line 242, in render
if (value and not ifnot) or (ifnot and not value):
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
112, in __nonzero__
iter(self).next()
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
106, in _result_iter
self._fill_cache()
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
692, in _fill_cache
self._result_cache.append(self._iter.next())
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
238, in iterator
for row in self.query.results_iter():
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py",
line 287, in results_iter
for rows in self.execute_sql(MULTI):
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py",
line 2369, in execute_sql
cursor.execute(sql, params)
File "C:\Python25\Lib\site-packages\django\db\backends\util.py",
line 19, in execute
return self.cursor.execute(sql, params)
File "C:\Python25\Lib\site-packages\ibm_db_django\base.py", line
189, in execute
return super(DB2CursorWrapper, self).execute(operation,
parameters)
File "c:\python25\lib\site-packages\ibm_db-1.0-py2.5-win32.egg
\ibm_db_dbi.py", line 1139, in execute
self._prepare_helper(operation)
File "c:\python25\lib\site-packages\ibm_db-1.0-py2.5-win32.egg
\ibm_db_dbi.py", line 995, in _prepare_helper
raise _get_exception(inst)
ProgrammingError: ibm_db_dbi::ProgrammingError: [IBM][CLI Driver][DB2/
AIX64] SQL0401N The data types of the operands for the operation "="
are not compatible. SQLSTATE=42818\r SQLCODE=-401
Request Method: GET
Request URL:
http://localhost:8000/admin/testapp/testmodel/1/history/
Exception Type: TemplateSyntaxError
Exception Value:
Caught an exception while rendering: ibm_db_dbi::ProgrammingError:
[IBM][CLI Driver][DB2/AIX64] SQL0401N The data types of the operands
for the operation "=" are not compatible. SQLSTATE=42818\r
SQLCODE=-401
Original Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\django\template\debug.py", line
71, in render_node
result = node.render(context)
File "C:\Python25\Lib\site-packages\django\template\defaulttags.py",
line 242, in render
if (value and not ifnot) or (ifnot and not value):
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
112, in __nonzero__
iter(self).next()
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
106, in _result_iter
self._fill_cache()
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
692, in _fill_cache
self._result_cache.append(self._iter.next())
File "C:\Python25\Lib\site-packages\django\db\models\query.py", line
238, in iterator
for row in self.query.results_iter():
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py",
line 287, in results_iter
for rows in self.execute_sql(MULTI):
File "C:\Python25\Lib\site-packages\django\db\models\sql\query.py",
line 2369, in execute_sql
cursor.execute(sql, params)
File "C:\Python25\Lib\site-packages\django\db\backends\util.py",
line 19, in execute
return self.cursor.execute(sql, params)
File "C:\Python25\Lib\site-packages\ibm_db_django\base.py", line
189, in execute
return super(DB2CursorWrapper, self).execute(operation,
parameters)
File "c:\python25\lib\site-packages\ibm_db-1.0-py2.5-win32.egg
\ibm_db_dbi.py", line 1139, in execute
self._prepare_helper(operation)
File "c:\python25\lib\site-packages\ibm_db-1.0-py2.5-win32.egg
\ibm_db_dbi.py", line 995, in _prepare_helper
raise _get_exception(inst)
ProgrammingError: ibm_db_dbi::ProgrammingError: [IBM][CLI Driver][DB2/
AIX64] SQL0401N The data types of the operands for the operation "="
are not compatible. SQLSTATE=42818\r SQLCODE=-401
Exception Location: C:\Python25\Lib\site-packages\django\template
\debug.py in render_node, line 81
Python Executable: C:\Python25\python.exe
Python Version: 2.5.4
Python Path: ['C:\\code\\django\\inner', 'C:\\Python25\\lib\\site-
packages\\ibm_db-1.0-py2.5-win32.egg', 'C:\\Python25\\Lib\\site-
packages\\ibm_db-0.8.0-py2.5-win32.egg', 'C:\\Windows\\system32\
\python25.zip', 'C:\\Python25\\DLLs', 'C:\\Python25\\lib', 'C:\
\Python25\\lib\\plat-win', 'C:\\Python25\\lib\\lib-tk', 'C:\
\Python25', 'C:\\Python25\\lib\\site-packages', 'C:\\Python25\\lib\
\site-packages\\PIL']
Server time: Tue, 3 Nov 2009 10:01:48 +0000