[sqlalchemy] Re: creating tables dynamically

2010-07-23 Thread Aref
Thank you for taking the time to reply. The application I am writing takes input from the user to define the table name, number of columns, types etc... I tried formatting the inputs in a list and then passing the list elements to Table(). I kept getting error messages. I abandoned this approach

[sqlalchemy] creating tables dynamically

2010-07-22 Thread Aref
Hello, I am working on an application where I would need to create a table in a database but I do not have a priori knowledge of how many columns does this table has. Is it possible to do this in SA? If so can someone point me to an example or reference documentation explaining how to accomplish

[sqlalchemy] Re: modifying a field

2010-06-22 Thread Aref
, 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 entity

[sqlalchemy] Re: modifying a field

2010-06-21 Thread Aref
, 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 entity

[sqlalchemy] modifying a field

2010-06-20 Thread Aref Nammari
is the best way to update or modify fields? I can't seem to find anything substantial regarding SQLSoup. Thanks Aref -- 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

[sqlalchemy] Re: modifying a field

2010-06-20 Thread Aref
...@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

[sqlalchemy] Re: modifying a field

2010-06-20 Thread Aref
...@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

[sqlalchemy] session save

2010-06-16 Thread Aref
Hello, I am learning sqlalchemy and been reading and working through the examples/tutorials in Copeland's Essential SQLAlchemy. I am running sqlalchemy 0.6.1 and python2.5 I am running into a problem when trying to save a session using save. session.save(newuser) for example. I get an error

[sqlalchemy] Re: session save

2010-06-16 Thread Aref
Thank you so much. I'll make a note of that. On Jun 16, 7:35 am, Michael Bayer mike...@zzzcomputing.com wrote: unfortunately Essential SQLA is sorely out of date, save() was moved to add() around the time of late 0.4 and in 0.6 we've removed the old save(). On Jun 16, 2010, at 9:31 AM, Aref

[sqlalchemy] Re: session save

2010-06-16 Thread Aref
, 2010, at 9:31 AM, Aref wrote: Hello, I am learning sqlalchemy and been reading and working through the examples/tutorials in Copeland's Essential SQLAlchemy. I am running sqlalchemy 0.6.1 and python2.5 I am running into a problem when trying to save a session using save. session.save

[sqlalchemy] help please

2010-06-10 Thread Aref
Hello All, I just began learning sqlalchemy and am not quite used to it yet so please excuse my ignorance and which might be a trivial question to some of you. I am writing a database module and need to load a table and possibly modify a record in the table. I can get the connection established

[sqlalchemy] Re: help please

2010-06-10 Thread Aref
are the table columns that may exist. How can I do that if at all? On Jun 10, 7:21 am, GHZ geraint.willi...@gmail.com wrote: you should access column names via lower case i.e. columns = 'projectid', 'program', 'progmanger'] On 10 Jun, 03:39, Aref arefnamm...@gmail.com wrote: Hello All, I just

[sqlalchemy] Re: help please

2010-06-10 Thread Aref
AM, Aref wrote:Thank you for the response. However, that is not the problem. If I do update = table.update(project.c.ProjectID=='project-name', values = {project.c.ProjectID:'program'}) print update update.execute() everything works fine. if I do this: test = 'table.c.'+columns[0] #columns