[Zope] Using blobs with sql

Carlos Neves cneves@ruido-visual.pt
Fri, 14 Apr 2000 11:29:18 +0100


Hi...

I'm trying to insert binary images in a table on an SQL Server, but I don't
seem to be able to pass the image through sql insert. Is there some special way
I can quote such an object in orther to avoid errors?

Errors raised are such as:


Traceback (innermost last): File F:\Portal\lib\python\ZPublisher\Publish.py, line 165, in publish File
F:\Portal\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: update) File
F:\Portal\lib\python\ZPublisher\Publish.py, line 102, in call_object (Object: update) File
F:\Portal\lib\python\OFS\DTMLMethod.py, line 150, in __call__ (Object: update) File
F:\Portal\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: update) File
F:\Portal\lib\python\OFS\DTMLMethod.py, line 146, in __call__ (Object: update_sub) File
F:\Portal\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: update_sub) File
F:\Portal\lib\python\DocumentTemplate\DT_In.py, line 691, in renderwob (Object: Articles) File
F:\Portal\lib\python\DocumentTemplate\DT_Util.py, line 335, in eval (Object:
sqlInsertArticle(theme=Topic,number=Number,
date=Today,summary=Summary,article=Article,image=Image)) (Info: Topic) File , line 0, in ? File
F:\Portal\lib\python\Shared\DC\ZRDB\DA.py, line 430, in __call__ (Object: sqlInsertArticle) File
F:\Portal\lib\python\Products\ZODBCDA\db.py, line 186, in query sql.error: ('37000', 105,
"[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quote before the character string
'\377\330\377\340'.") 

I have tried all I could remember...

Thanx in advance

 --  Carlos Neves
cneves@ruido-visual.pt