[Zope] DCOracle 2 and long text fields..How to use them?

Matthew T. Kromer matt@zope.com
Mon, 06 May 2002 10:30:53 -0400


Geir B=E6kholt wrote:

>Hello Chris,=20
>
>
>You have to use bind-variables or a stored procedure. Oracle or the
>adapter (not sure which) don't want those huge strings in the middle
>of an SQL statement it has to parse..
>
>:-)
>
>hth
>

Right, bind vars are the way to go.  Unfortunately, Zope doesn't create=20
bind variables for SQL methods, so you have to do it via an external meth=
od.


>
>Friday, May 3, 2002, 11:49:15 PM, you wrote:
>CB> Hello,
>CB> Maybe someone here can help..
>
>CB> I had thought that DCOracle 2 (now) supported long text fields, but=20
>CB> when I tried to insert more than 2k into one (after upgrading) I got=
=20
>CB> a 'string literal too long' error from Oracle.
>
>CB> Is there some trick to this or am I running into a DCO2 or Oracle li=
mitation?
>
>CB> I'm using Oracle 7 which (I think) is supposed to support up to 32k=20
>CB> in long text fields..
>
>CB> I'd hate to have to continue working around this in the way I have,=20
>CB> by using Oracle7's 2k(max) varchar2 columns and splitting text in=20
>CB> Python on input/concatenating them together on output.. That is just=
=20
>CB> ugly..
>
>CB> There must be a better way...
>
>CB> Also, is there any way to use the LONG RAW datatype to store images?
>
>CB> We are using Zope with Oracle as a CMS and need the long text=20
>CB> capability for descriptions within web pages..
>
>CB> BTW...We are a nonprofit and can't afford the upgrade to Oracle 8/9.=
. etc.
>
>CB> -Chris
>
>
>


--=20
Matt Kromer
Zope Corporation  http://www.zope.com/=20