registerguard / django_odbc

A test of connecting to a DTI Intersystems Caché database using the egenix.com mxODBC Django Database Engine - Django ODBC Adapter.
2 stars 0 forks source link

id_list empty? #2

Closed jheasly closed 9 years ago

jheasly commented 9 years ago
cursor.execute('''DELETE FROM dt_z_guide.apBulletin WHERE id NOT IN (%s)''' % str(id_list))
mx.ODBC.Error.ProgrammingError: ('37000', 12, '[Cache ODBC][State : 37000][Native Code 12]\n[libcacheodbciw.so]\n[SQLCODE: <-12>:<A term expected, beginning with one of the following: identifier, constant, aggregate, $$, :, (, +, -, %ALPHAUP, %EXACT, %MVR, %SQLSTRING, %SQLUPPER, %STRING, or %UPPER>]\r\n[Location: <Prepare>]\r\n[%msg: < A term expected, beginning with either of:  identifier, constant, aggregate, $$, (, :, +, -, %ALPHAUP, %EXACT, %MVR %SQLSTRING, %SQLUPPER, %STRING. or %UPPER^DELETE FROM dt_z_guide . apBulletin WHERE id NOT IN ( [>]', 9879)
jheasly commented 9 years ago

I think you need to change error to err:

Traceback (most recent call last): File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 120, in if name == "main" : main() File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 28, in main print error NameError: global name 'error' is not defined

jheasly commented 9 years ago

Traceback (most recent call last): File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 120, in if name == "main" : main() File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 30, in main connection.encoding = 'utf-8' UnboundLocalError: local variable 'connection' referenced before assignment

jheasly commented 9 years ago

Traceback (most recent call last): File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 119, in if name == "main" : main() File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 51, in main if updates_list: UnboundLocalError: local variable 'updates_list' referenced before assignment

jheasly commented 9 years ago

Traceback (most recent call last): File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 119, in if name == "main" : main() File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 51, in main if updates_list: UnboundLocalError: local variable 'updates_list' referenced before assignment

jheasly commented 9 years ago

Traceback (most recent call last): File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 118, in if name == "main" : main() File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 81, in main connection.encoding = 'utf-8' UnboundLocalError: local variable 'connection' referenced before assignment

jheasly commented 9 years ago

It's back!

Traceback (most recent call last): File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 120, in if name == "main" : main() File "/Users/jheasly/Development/django_odbc/django_odbc/turin/lxml_objectify_parse_ap_bulletin.py", line 85, in main cursor = connection.cursor() UnboundLocalError: local variable 'connection' referenced before assignment