On Feb 26, 5:08 pm, carlo <[email protected]> wrote:
> About the semicolon Massimo suggested in line 789:
> self._execute = lambda a: self._cursor.execute(a[:-1])
I did try that too before I posted but as you say it does not work
(yet).
I also tried changing the id definition to:
'id': 'INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL',
to avoid problems later with the missing 'NOT NULL'
but now it fails with:
Traceback (most recent call last):
File "C:\web2py\trunk\gluon\restricted.py", line 98, in restricted
exec ccode in environment
File "C:/web2py/trunk/applications/test/models/db.py", line 7, in
<module>
SQLField('name','string') )
File "C:\web2py\trunk\gluon\sql.py", line 859, in define_table
raise e
TypeError: The first argument to execute must be a string or unicode
query.
The model (db.py) is:
#!/usr/bin/python
# -*- coding: utf-8 -*-
db=SQLDB('db2:DSN=dot8;UID=test;PWD=db2py')
db.define_table('person',
SQLField('name','string') ) #line 7
db.define_table('dog',
SQLField('name','string'),
SQLField('owner',db.person)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---