The insert function in web2py expects db.tablename.insert(...) with column 
name and value pairs. What if the table has lengthy field names and i wish 
to insert in the table by iterating through all the fields.
I tried:

for field in db[db.MyTable]:
                 nme='\''+field.name+'\''
                 db.Account_Master.insert(nme='somevalue')

It is giving me error as:
<type 'exceptions.SyntaxError'> Field nme does not belong to the table

When i try field.name instead of nme, editor does not let me save and gives 
error as:

keyword can't be an expression 

Reply via email to