[Zope-DB] Zope/Plone, interbase, and blob fields

bobb rawsystems at gmail.com
Fri Aug 5 13:39:48 EDT 2005


----- Original Message -----
From: "Ashley Lloyd" <ashleylloyd at hotmail.com>
To: <zope-db at zope.org>
Sent: Friday, August 05, 2005 6:55 AM
Subject: [Zope-DB] Zope/Plone, interbase, and blob fields


> Apologies if this appears twice - I initially sent from the wrong
address!!
>
> Hi, I've been having trouble updating BLOB (subtype text) fields from
Zope.
>
> I've a table with several fields, one of which is a blob. Creating a
record
> works fine, but when I attempt to update a record, I get an error.
Initially
> I used gvib, but recently (thanks to a lot of help from another list) I
> changed to kinterbasdbDA, and I still get errors.
> The errors I get are as follows:
> Error Type ProgrammingError
> Error Value (-413, 'execute.isc_dsql_execute: conversion error from string
> "BLOB". ')
> Error Trace Traceback (most recent call last):
> File "C:\Program
> Files\ESOPPlone\Zope\lib\python\DocumentTemplate\DT_Try.py", line 149, in
> render_try_except
> result = render_blocks(self.section, md)
> File "C:\Program
> Files\ESOPPlone\Zope\lib\python\DocumentTemplate\DT_Util.py", line 201, in
> eval
> return eval(code, d)
> File "", line 2, in f
> File "C:\Program Files\ESOPPlone\Zope\lib\python\Shared\DC\ZRDB\DA.py",
line
> 428, in __call__
> else: result=DB__.query(query, self.max_rows_)
> File "C:\Program
> Files\ESOPPlone\Zope\lib\python\Products\kinterbasdbDA\db.py", line 198,
in
> query
> self.cursor.execute(src)
> File "C:\Program
>
Files\ESOPPlone\Zope\lib\python\Products\kinterbasdbDA\kinterbasdb\__init__.
> py", line 585, in execute
> res = _kinterbasdb.execute(self._C_cursor, sql, params)
> ProgrammingError: (-413, 'execute.isc_dsql_execute: conversion error from
> string "BLOB". ')
> I also get a similar error (same value & type) when just testing the SQL
> method in the ZMI, even when the SQL that the method generates is just:
> UPDATE ENTITY
> SET EN_NOTES = 'Hello world'
> WHERE EN_KEY = 12
> The metatata of the table has the notes field definition as:
> EN_NOTES BLOB SUB_TYPE 1 SEGMENT SIZE 80,

Maybe you should try changing the blob type? (as a test, anyway)
For InterBase 6 there are reserved 7 subtypes:

0 - Unstructured, generally applied to binary data or data of an
indeterminate type
1 - Text
2 - Binary language representation (BLR)
3 - Access control list
4 - (Reserved for future use)
5 - Encoded description of a table's current metadata
6 - Description of multi-database transaction that finished irregularly

or  possbly sub_type -1 segment size 65535  ---user defined subtype -1 with
segment size of 64K for example

hth

bobb

> Any update that does not involve this field works fine, and the field can
be
> set to null, but it will not allow me to update.
> I am running quite an old version of Zope - its from a Plone install.
> Zope Version - (Zope 2.6.1 (binary release, python 2.1, win32-x86), python
> 2.1.3, win32)
> Python Version - 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)]
> System Platform - win32
> I got quite a bit of help from the general list, but no-one could
understand
> why I was getting this error, especially when in one case, someone else
had
> a remarkably similar setup, and even sent me his database adaptor, and he
> doesn't get the errors! I even removed all variables, and just tested the
> SQL exactly as it was above (not generated by dtml-sqlvar tags at all),
and
> still got the errors.
> Can anyone help?
> Thanks in advance
> Ashley
> _______________________________________________
> Zope-DB mailing list
> Zope-DB at zope.org
> http://mail.zope.org/mailman/listinfo/zope-db



More information about the Zope-DB mailing list