[Zope] Using blobs with sql

Jim Sanford jsanford@atinucleus.com
Fri, 14 Apr 2000 10:00:21 -0500


I had problems inserting large memo fields in VFP via ODBC I solved the problem bybreaking the memo into smaller chunks (120 bytes)
and doing an insert of the first chunk and then "update VFPTable set memo_field=memo_field+next_chunk where key_field=key_var" for
each of the remaining chunks.
 __________________________________________________________________

              Jim Sanford
      .       Database/Web Engineer
     / \  /   Accelerated Technology, Inc.
    /   /     720 Oak Circle Drive East
   /  /  \    Mobile, AL 36609
  / /     \   Voice: 334-661-5770  fax: 334-661-5788
 /         \  E-Mail: jsanford@atinucleus.com
              Web: http://www.atinucleus.com

 Nucleus.  All You NEED in an RTOS.  Royalty Free.
 __________________________________________________________________



----- Original Message -----
From: Carlos Neves <cneves@ruido-visual.pt>
To: <zope@zope.org>
Sent: Friday, April 14, 2000 5:29 AM
Subject: [Zope] Using blobs with sql


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

_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )