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
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.
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:
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
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
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
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
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
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=
9 matches
Mail list logo