"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 4 Apr 2005 15:54:37 -0700, "3c273" <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > > Thanks for the link, but this is the step I am trying to save (for someone > > else). Every time he goes to run a report, he must stop and import any new > > csv files. Since the files are generated by a Python script, I thought I > > That information wasn't supplied in the original message. Your > original post implied that the data source /was/ the CSV file... > > Show us the code segment that is writing the CSV file, and we > can probably show you the DB-API equivalent for "writing" a new record > to the table. > > For short however: > > aCustomer = "Customer1" > theWidget = "Widget1" > aQuantity = 1000 > > # I'm presuming the table only has the three columns, since you didn't > list fields > cursor.execute(""" INSERT INTO "Table1" Values (%s, %s, %s) """, > (aCustomer, theWidget, aQuantity))
Ah.. Many thanks. This is what I was looking for. Louis -- http://mail.python.org/mailman/listinfo/python-list