So this works db(query).update(field=value,...)
but this db(query).select().first().update_record(field=value,....) does not for keyed tables. thanks Denes for the clarification. On Jan 21, 8:20 am, DenesL <denes1...@yahoo.ca> wrote: > Hi Pier, welcome to the group. > > I believe there is a slight misunderstanding probably generated by > Note 5 in the referenced post: > 5) update_record function is not available > > update_record is a function used to update single records (objects of > class gluon.sql.Row) and for technical reasons it is not available in > keyed tables but all the other functions that apply to regular tables > also work for keyed ones: update, insert, delete, ... > and they behave almost the same way, the post shows the differences > using examples. > > Denes. > > On Jan 21, 3:35 am, m3tr0 <pier.cart...@gmail.com> wrote: > > > Hi to all, > > I'm new to the list and also to web2py (I started learning it a week > > ago). > > So first of all I must say Thank You to Massimo and to the community > > for such a great framework!!! Your work is much appreciated! > > Now back to my question. > > I've a database on a mssql server with some tables; i need to expose > > these tables to the internal lan so users can modify the records > > (please note I need to modify record already present in table and not > > create new ones). As you can image the structure of the tables is > > fixed (I can not modify it, no possibility to add id column) so I > > think I should use the keyed tables as exposed here [1] but as far as > > i can understand, update of record is not possible at the moment with > > keyed tables. > > > So my idea is: > > -define the legacy table in web2py (with migrate= False and > > primarykey) > > -use the SQLFORM helper to generate forms > > -do manually update using pyodbc > > > Is this feasible? any suggestion or code example is welcome! > > > Thanks! > > Pier > > [1]http://groups.google.com/group/web2py/browse_thread/thread/db150376b0... > >
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.