Tue, 14 Aug 2001 13:15:05 -0700
That did the trick! That's for all the help.
At 09:59 PM 8/14/01 +0200, M.-A. Lemburg wrote:
>Ryan Weisenberger wrote:
> > I'm trying to insert and retrieve BLOBs from a SQL Server db using
> > mxODBC. I'm assuming I need some function equivalent to addSlashes() to
> > escape the binary stream before I insert it in the db. Does anyone know of
> > an easy way to do this in Python? Is there such a function?
>You normally don't need to do that as long as you pass the BLOB
>as bound parameter:
>cursor.execute('INSERT INTO ... VALUES (?,?)', (id, blob))
>mxODBC will then pass the BLOB data to the ODBC driver and the
>driver will apply any escaping which might be necessary (if at all).
>CEO eGenix.com Software GmbH
>Consulting & Company: http://www.egenix.com/
>Python Software: http://www.lemburg.com/python/