There is nothing wrong with this approach. It is possible that you have some unwanted hidden char in the code. Email me the db.py file and I will take a look.
Massimo On Mar 10, 10:51 pm, Eduardo <meketr...@gmail.com> wrote: > Hello, > > I generated a new simple app through "New Simple Application" and > then changed its db.py to the following: > > db = DAL('sqlite://MyDB.sqlite') > > db.define_table('estudantes', > > # DADOS PESSOAIS > > Field('Nome', 'string'), > > Field('Pais', 'string'), > > Field('Nascimento', 'date'), > > Field('Sexo', 'string'), > > Field('Email', 'string')) > > Well, now every time I try to insert a new entry via appadmin, I get > an Operational Error message: > > Traceback (most recent call last): > File "/home/eduardo/web2py/gluon/restricted.py", line 188, in > restricted > exec ccode in environment > File "/home/eduardo/web2py/applications/teste4/controllers/ > appadmin.py", line 412, in <module> > File "/home/eduardo/web2py/gluon/globals.py", line 95, in <lambda> > self._caller = lambda f: f() > File "/home/eduardo/web2py/applications/teste4/controllers/ > appadmin.py", line 127, in insert > if form.accepts(request.vars, session): > File "/home/eduardo/web2py/gluon/sqlhtml.py", line 1186, in accepts > self.vars.id = self.table.insert(**fields) > File "/home/eduardo/web2py/gluon/dal.py", line 3952, in insert > return self._db._adapter.insert(self,self._listify(fields)) > File "/home/eduardo/web2py/gluon/dal.py", line 717, in insert > raise e > OperationalError: near ")": syntax error > > What am I missing here? > > Eduardo