Re: cursor.executemany() float error

2006-12-03 Thread progman
i am using mysql i tried the cursor.executemany('insert into promo (`From`,`To`, `RATE`) \ values (%s,%s,%s)', [ ('AA','BB',10.2), ('CC','DD',10.3) ] ) and it works. very strange. isn't it? Fredrik Lundh wrote: > progman wrote: > > > cursor.executemany('insert into promo (`From`,`To`, `

Re: cursor.executemany() float error

2006-12-03 Thread Fredrik Lundh
progman wrote: > cursor.executemany('insert into promo (`From`,`To`, `RATE`) \ > values (%s,%s,%f)', [ ('AA','BB',10.2), ('CC','DD',10.3) ] ) > > i got this error: > TypeError: float argument required > > i checked, 10.2 & 10.3 , there are at the right loc. > what went wrong?? posting a bit mo

cursor.executemany() float error

2006-12-03 Thread progman
Data Struct: from (string), to (string), rate (float) when i run this: cursor.executemany('insert into promo (`From`,`To`, `RATE`) \ values (%s,%s,%f)', [ ('AA','BB',10.2), ('CC','DD',10.3) ] ) i got this error: TypeError: float argument required i checked, 10.2 & 10.3 , there are at the right