I'll need to try this with a simpler table and dictionary next week.  

The table and dictionary I'm working with now has about 50 fields, and the 
insert and update methods are working fine with that.  I wrapped it all in 
a try/except/else statement with db.rollback() and db.commit() to help with 
some of the issues I was having, so I'll need to change my code to return 
exceptions or have web2py generate an error ticket.

I'll try it with a simpler table definition that I can safely share on the 
web, and will let you know what i find.  Thanks for you help!





On Friday, July 7, 2017 at 5:00:19 PM UTC-7, Anthony wrote:
>
> On Friday, July 7, 2017 at 7:57:57 PM UTC-4, ad...@swcacloud.com 
> <javascript:> wrote:
>>
>> Sorry about that, my code is in flux right now as I'm working through it.
>>
>>
>> Here are two methods that are working:
>>
>> db[table_name].insert(**r)
>>
>> db(db[table_name]._id == current_id).update(**r)
>>
>>
>> These methods aren't working:
>>
>> db[table_name].update_or_insert(**r)
>>
>> db[table_name].update_or_insert(db[table_name]._id == current_id,**r)
>>
>
> Please define "aren't working". What do you expect, and what do you 
> observe instead? Are you getting an exception? What does the "r" dictionary 
> look like? What is the table definition?
>
> Anthony
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to