MySQL Insert

2008-07-15 Thread maestroQC
Hi, Its one of those days. I cannot solve this. Any help would be greatly appreciated! When I execute this: class Db(object): def insertAccount(self, date, accountNumber, description, openingBalance): dec = decimal.Decimal(openingBalance) db = MySQLdb.connect(host="localhost",

Re: MySQL Insert

2008-07-15 Thread maestroQC
Thanks for the information. However I must stick to decimal since I'm dealing with monetary values. I loose the decimals with int and float has only supports one decimal place. I tried as you suggested to use the %s instead of the %d to no avail. -- http://mail.python.org/mailman/listinfo/python-l

Re: MySQL Insert

2008-07-16 Thread maestroQC
Thanks to all for your time and patience with this! The insert is working fine based on the suggestions in this thread. I now have another problem that should be resolved with a regular expression to remove currency formatting before inserting into the db. -- http://mail.python.org/mailman/listinf