Thanks Danes, But this is not the problem. The table has an ID. The problem is that I can't rename the table, and it's name is "another_name"
And I want to do something like: db.product.insert(name="Box") Thanks, Marcello On Dec 31, 3:03 pm, DenesL <denes1...@yahoo.ca> wrote: > Hi Marcello. > > if your table has an auto-increment integer field you can do: > > db.define_table('another_name',Field('the-auto-inc-field','id'), ...) > > if not then sorry, no one has contributed the keyed table support for > mysql, > see:http://web2py.com/book/default/chapter/06#Legacy-Databases-and-Keyed-... > > Denes > > On Dec 31, 8:17 am, Marcello Parra <parro...@gmail.com> wrote: > > > > > > > > > Hello, > > > I have a legacy database, and want to access it with web2py. > > One table is called "another_name" in the database (mysql). > > > But I want to use it in web2py as: > > > db.define_table('person', Field('name')) > > > I read docs, but could not figure this out.... > > > Thanks for any help... > > > Marcello