Re: [web2py] Update and Delete row issue

2013-01-10 Thread Wonton
I found it, it was my fault of course. The problem was that, in the method where I make the delete, several lines after the deletion (in a code not related with the database) I use a global variable not defined so the method fails, don't return anything and I guess some automatic db.commit is n

Re: [web2py] Update and Delete row issue

2013-01-10 Thread Wonton
Hello, I've checked that from a fresh installation all inserts, updates and deletes of the database work perfectly without db.commit(). Besides this, I have 6 tables in which I do inserts, updates and deletes in all of them without db.commit() and they work perfectly, except for a specific one.

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Wonton
I will try to do it, but, since I have confidential data I don't know if I will be able do it. Meanwhile I will try to make a fresh app and go step by step. El domingo, 30 de diciembre de 2012 18:19:42 UTC+1, Niphlod escribió: > > > > On Sunday, December 30, 2012 2:33:42 PM UTC+1, Wonton wrote:

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Niphlod
On Sunday, December 30, 2012 2:33:42 PM UTC+1, Wonton wrote: > > But it's strange. I have all this code inside my default.py controller, > inside web2py. > Indeen, these 2 lines: > query = db(db.table.field1=='What I am looking for') > query.update(field2='hello') > work perfectly even witho

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Wonton
But it's strange. I have all this code inside my default.py controller, inside web2py. Indeen, these 2 lines: query = db(db.table.field1=='What I am looking for') query.update(field2='hello') work perfectly even without the db.commit(). But, this code: query = db(db.table.field1=='What I am l

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Niphlod
for future references: issuing db.commit() is necessary only if you're using DAL outside web2py. As soon as the function in the controller is executed, a db.commit() is issued automatically as long as no exceptions are thrown. query = db(db.table.field1=='What I am looking for') query.update(f

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Wonton
Hello viniciusban! The line "db.commit()" solved these 2 problems, thank you very much! Regarding to why I used "update_record()" without parameters, I took it from an example I saw on Internet, maybe the example was wrong or maybe (probably) I missunderstood the example. Thank you very much a

Re: [web2py] Update and Delete row issue

2012-12-29 Thread Vinicius Assef
On Sat, Dec 29, 2012 at 10:19 PM, Wonton wrote: > Hello everyone and happy new year! Hi. > > I'm having an issue regarding the updating and deletion of a row in my > tables and I can't find any solution, so I hope you can help me. > > 1) Regarding to the update: > As far as I know, to update a r

[web2py] Update and Delete row issue

2012-12-29 Thread Wonton
Hello everyone and happy new year! I'm having an issue regarding the updating and deletion of a row in my tables and I can't find any solution, so I hope you can help me. 1) Regarding to the update: As far as I know, to update a row I should do something like this: query = db(db.table.field1=