sorry for my delay but I got the flu, today I will post my results either.
carlo On 24 Feb, 23:54, mdipierro <mdipie...@cs.depaul.edu> wrote: > guess not. leave it as it was. > > One of the execute in create table was failing. Perhaps it did not > like the trailing ; or traling \n. Or perhaps the query was wrong. > Can you help debug which one was failing? > > Massimo > > On Feb 24, 4:37 pm, DenesL <denes1...@yahoo.ca> wrote: > > > On Feb 24, 4:44 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > Can you try change line 785 from > > > > self._execute = lambda *a, **b: self._cursor.execute(*a, **b) > > > > to > > > > self._execute = lambda a: self._cursor.execute(a[:-1]) > > > In my sql.py the line number is 789, changed as instructed. > > > > Any better? > > > >>> db=SQLDB('db2:DSN=dot8;UID=test;PWD=db2py') > > >>> db.define_table('tt', > > > ... SQLField('int','integer'), > > ... SQLField('str','string')) > > <SQLSTable {'ALL': <gluon.sql.SQLALL object at 0x01928790>, 'str': > > <gluon.sql.SQ > > LField object at 0x01928690>, '_referenced_by': [], 'fields': ['id', > > 'int', 'str > > '], '_db': <SQLStorage {'_connection': <pyodbc.Connection object at > > 0x019287A0>, > > '_lastsql': 'CREATE TABLE tt(\n\tid ROWID NOT NULL,\n\tint INT,\n > > \tstr VARCHAR( > > 32)\n);', '_dbname': 'db2', '_execute': <function <lambda> at > > 0x0192F530>, 'tt': > > <SQLSTable {...}>, '_pools': 0, '_folder': 'applications\\test\ > > \databases', '_u > > ri': 'db2:DSN=dot8;UID=test;PWD=db2py', 'tables': ['tt'], > > '_translator': {'upper > > ': 'UPPER(%(field)s)', 'reference': 'INT, FOREIGN KEY (%(field_name)s) > > REFERENCE > > S %(foreign_key)s (id) ON DELETE %(on_delete_action)s', 'text': > > 'CLOB', 'random' > > : 'RAND()', 'datetime': 'TIMESTAMP', 'substring': 'SUBSTR(%(field)s,% > > (pos)s,%(le > > ngth)s)', 'boolean': 'CHAR(1)', 'extract': 'EXTRACT(%(name)s FROM % > > (field)s)', ' > > id': 'ROWID NOT NULL', 'is null': 'IS NULL', 'is not null': 'IS NOT > > NULL', 'blob > > ': 'IMAGE', 'notnull': 'NOT NULL DEFAULT %(default)s', 'string': > > 'VARCHAR(%(leng > > th)s)', 'date': 'DATE', 'integer': 'INT', 'password': 'VARCHAR(% > > (length)s)', 'lo > > wer': 'LOWER(%(field)s)', 'left join': 'LEFT OUTER JOIN', 'double': > > 'DOUBLE', 'u > > pload': 'VARCHAR(128)', 'time': 'TIME'}, '_cursor': <pyodbc.Cursor > > object at 0x0 > > 192D6E8>}>, '_dbt': 'applications\\test\\databases\ > > \a574356351ae1b28d83f975bec5a > > 0c18_tt.table', 'int': <gluon.sql.SQLField object at 0x01928870>, > > '_tablename': > > 'tt', '_logfilename': 'applications\\test\\databases\\sql.log', 'id': > > <gluon.sql > > .SQLField object at 0x019287D0>}>>>> db.tt.insert(int=1,str='hello') > > > Traceback (most recent call last): > > File "<console>", line 1, in <module> > > File "C:\web2py\trunk\gluon\sql.py", line 1303, in insert > > self._db._execute(query) > > File "C:\web2py\trunk\gluon\sql.py", line 790, in <lambda> > > self._execute = lambda a: self._cursor.execute(a[:-1]) > > Error: ('HY000', '[HY000] [IBM][iSeries Access ODBC Driver][DB2 UDB] > > SQL7008 - TT > > in QGPL not valid for operation. (-7008) (SQLExecDirectW)') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---