binary data into MS-SQL server via ODBC

Steven sadams123 at optushome.com.au
Wed Mar 5 00:45:05 CET 2003


Thanks Jimmy, that worked perfectly


"Jimmy Retzlaff" <jimmy at retzlaff.com> wrote in message
news:mailman.1046762465.1787.python-list at python.org...

> import dbi
> import odbc
> connectionString = 'Driver={SQLServer};Server=(local);Database=tempdb'
> cursor = odbc.odbc(connectionString).cursor()
> cursor.execute('create table #testtable (testcolumn image)')
> cursor.execute('insert #testtable (testcolumn) values (?)',
>                          (dbi.dbiRaw('as\x00\x01\x02df'),)
>             )








More information about the Python-list mailing list