Two issues: a) You need to give SA a table definition for the table you're trying to update. b) You need to specify the name of the column to update in the dict(), not the string 'key'
I've updated the script to work by passing in both the column name to update and the update value to use. I've made my changes in bold below: def main(*key, val*): engine = create_engine('mssql://dbName:[EMAIL PROTECTED]') * # No table name in URI !! /%s' % tblName)* conn = engine.connect() # create MetaData meta = MetaData() # bind to an engine meta.bind = engine * # specify table definition tbl = Table('tbl_Acct_prefs', meta, Column('netname', VARCHAR(20)), Column('pref_name', VARCHAR(40)), Column('pref_value', VARCHAR(40)) )* # create metadata *#* meta.create_all() * # <=== you need this only if you're creating the table with your program* tbl.update(tbl.c.netname=='saw').execute(*{key:val}*) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---