Here is the echoed info when the code is run:
2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 PRAGMA table_info("tf_user") 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 () 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 PRAGMA foreign_key_list("tf_user") 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 () 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 PRAGMA index_list("tf_user") 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 () <class 'sqlalchemy.ext.sqlsoup.MappedTf_user'> 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 BEGIN 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 COMMIT 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 BEGIN 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 SELECT tf_user.id, tf_user.user_name, tf_user.password, tf_user.display_name, tf_user.created FROM tf_user 2010-06-20 16:00:02,546 INFO sqlalchemy.engine.base.Engine.0x...6c50 () [['1', u'Joey', u'top-Secret', u'plummer', '2010-06-19 20:35:27.093000']] On Jun 20, 3:40 pm, Michael Bayer <mike...@zzzcomputing.com> wrote: > On Jun 20, 2010, at 5:33 PM, Aref wrote: > > > I tried that and still cannot seem to change the field. > > is "password" an actual column in the database table ? create a SQLSoup > using an engine obtained via create_engine(), and specify echo=True on that > engine to see what SQL is actually emitted. > > > > > > > On Jun 20, 3:25 pm, Michael Bayer <mike...@zzzcomputing.com> wrote: > >> On Jun 20, 2010, at 5:18 PM, Aref Nammari wrote: > > >>> I have the following code: > > >>> db = SqlSoup('sqlite:///c:\\tutorial.db3') > >>> db_dynamic = 'tf_user' > >>> DB = db.entity(db_dynamic) > >>> print DB > >>> ColHeader = DB.c.keys() > >>> conn = db.connection() > >>> #modify a field > >>> DB.password = 'hello' > >>> db.flush() > > >>> #get the table data > >>> data = select([db.tf_user],) > >>> listdata=[] > >>> for row in conn.execute(data): > >>> row = ["%s" % el for el in row] > >>> listdata.append(row) > >>> print listdata > > >>> which is supposed to modify the value of the password field in a database > >>> to 'hello'. However, when I examine the database nothing has changed, the > >>> old value is still there. What am I doing wrong? What is the best way to > >>> update or modify fields? I can't seem to find anything substantial > >>> regarding SQLSoup. > > >> you need to commit() the transaction. The current 0.6 docs describe > >> this:http://www.sqlalchemy.org/docs/reference/ext/sqlsoup.html?highlight=s...Hide > >> quoted text - > > >> - Show quoted text - > > > -- > > You received this message because you are subscribed to the Google Groups > > "sqlalchemy" group. > > To post to this group, send email to sqlalch...@googlegroups.com. > > To unsubscribe from this group, send email to > > sqlalchemy+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/sqlalchemy?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.