[Zope] storing blob data in SQLServer using ZSQL

Dieter Maurer dieter at handshake.de
Wed Jun 28 16:10:16 EDT 2006


Satchidanand Haridas wrote at 2006-6-27 19:37 -0500:
>How can I save blob data in SQLServer using ZSQLs? I'm using mxODBC. I 
>have a ZSQL that looks something like this:
>
>> update
>>     table_name
>> set
>>     blob_data = <dtml-sqlvar "i_blob_data" type="nb">
>> where
>>     conditions....
>But I get the following error when I run the above ZSQL:
>
>> ProgrammingError: ('07002', 0, '[Microsoft][ODBC SQL Server 
>> Driver]COUNT field incorrect or syntax error', 6108) 

You cannot use "ZSQL" to put binary (blob) data into
the database. You can have some chance when you use
base64 encoding -- provided, your data is not too large.



-- 
Dieter


More information about the Zope mailing list