python - Pyodbc column name as variable -


Instead of editing the SQL-string when I want to change the column that I want to use a variable. . it seems to work, I did not get an error, but does not update the database ... what's wrong with this?

  cnxn = pyodbc.connect ( 'driver = Free TDS; server = dkvmsql08; port = 1433; Database = Dingdong_test; UID = DAC \ SSC-Dingdong; PWD = C 90,346 Kejeacjkh and amp; in% update dad742210a3d6fd4436c; T $ to = Sianaksan Kresrs () name = Denise Q. Akskyut ( "Dibo. Teststep set. Aksikyut (" update Dibiost set? = 1 where id =? ", name, Panktikaidi) < / code> 

there is no clear statement and Connect in your code T call is not included in the autocommit = true , then try to add at the end of your code cnxn.commit () .)


Comments