On Mar 23, 9:50 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Godzilla wrote: > > On Mar 23, 4:38 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > >> On 22 Mar 2007 05:36:46 -0700, "Godzilla" <[EMAIL PROTECTED]> > >> declaimed the following in comp.lang.python: > > >>> Steve, I think I've tried what you have suggested without any luck as > >>> well... The statement works fine, but what inserted is not correct... > >>> it seems like only the symbol '?' was inserted into the blob field... > >> You didn't have a set of 's around the ?, did you? Parameter > >> substitution will add needed quotes on its own rather than you having to > >> put in quotes. > > >> Also, though I find no documentation on it, odbc module cursors > >> have > >> setinputsizes() and setoutputsizes() methods -- perhaps that could > >> change things... OTOH: the db-api 1.0 PEP (which is, it seems, what odbc > >> module follows) says they may be do-nothing methods. > >> -- > >> Wulfraed Dennis Lee Bieber KD6MOG > >> [EMAIL PROTECTED] [EMAIL PROTECTED] > >> HTTP://wlfraed.home.netcom.com/ > >> (Bestiaria Support Staff: [EMAIL PROTECTED]) > >> HTTP://www.bestiaria.com/ > > > Everything seems to work fine right now... thanks all of you for > > helping... Have a great day.. > > Have you any idea what fixed the problem? > > regards > Steve > -- > Steve Holden +44 150 684 7255 +1 800 494 3119 > Holden Web LLC/Ltd http://www.holdenweb.com > Skype: holdenweb http://del.icio.us/steve.holden > Recent Ramblings http://holdenweb.blogspot.com- Hide quoted text - > > - Show quoted text -
Hi Steve, I guess Dennis and yourself pointed me to the right direction; no need the 's around ? and also the parameter substitution requires tuple. I.e.: qry.execute("Insert into tBlob (data) values (?)", (data.encode('hex'),)) Thanks again guys... it's been greatly appreciated by the team here as well. -- http://mail.python.org/mailman/listinfo/python-list