Hello, I am accessing a Pervasive SQL data source using odbc and I'm having this trouble:
import dbi import odbc # the first execute works pnumber = '09F153' wh = '00' qty = 3 myconn = odbc.odbc('DSN=MKPT01') mycursor = myconn.cursor() mycursor.execute(""" SELECT "INVENTORY"."CODE", "INVENTORY"."INV_DESCRIPTION" FROM "INVENTORY" WHERE "INVENTORY"."CODE" = ? AND WHSE = ? """, [pnumber, wh]) results = mycursor.fetchall() print results # this one below doesn't mycursor.execute("""UPDATE INVENTORY SET ONHAND = ? WHERE CODE = ? AND WHSE = '00' """, [pnumber, qty]) #mycursor.commit() mycursor.close() If I don't use parameter in the update code, it updates fine. Am I missing something? Is this a problem specific to the Pervasive SQL? For example, this works: mycursor.execute("""UPDATE INVENTORY SET ONHAND='0' WHERE CODE = '09F153' AND WHSE = '00' """) Thanks Eduardo _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor