In this example I used:
DB.password = 'hello' where passwod is the column name. Can I pass
the column name in a variable? It does not seem that I could. I have
tried different ways but none seems to work.
Thanks.
On Jun 20, 5:18 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 20, 2010,
Thank you so much. That worked. I was staring at the SQLsoup doc you
linked to for hours trying to understand but could not figure what the
_ meant. In any case your explanation is clear and very useful.
Thanks again.
On Jun 20, 5:18 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 20,
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.
yes the field password is an actual column. Below is the table
definition:
from sqlalchemy import *
from datetime import datetime
metadata = MetaData('sqlite:///c:\\tutorial.db3')
user_table = Table(\
'tf_user', metadata,
Column('id', Integer,
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
On Jun 20, 2010, at 5:53 PM, Aref wrote:
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()
It appears you're using a method called