Re: [Zope] DCOracle 2 and long text fields..How to use them?
Hello Chris, 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 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 CB> when I tried to insert more than 2k into one (after upgrading) I got 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 limitation? CB> I'm using Oracle 7 which (I think) is supposed to support up to 32k CB> in long text fields.. CB> I'd hate to have to continue working around this in the way I have, CB> by using Oracle7's 2k(max) varchar2 columns and splitting text in CB> Python on input/concatenating them together on output.. That is just 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 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 -- Geir Bækholt web-developer geirh@funcom.com funcom oslo | webdev-team
Geir Bækholt wrote:
Hello Chris,
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 bind variables for SQL methods, so you have to do it via an external method.
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 CB> when I tried to insert more than 2k into one (after upgrading) I got 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 limitation?
CB> I'm using Oracle 7 which (I think) is supposed to support up to 32k CB> in long text fields..
CB> I'd hate to have to continue working around this in the way I have, CB> by using Oracle7's 2k(max) varchar2 columns and splitting text in CB> Python on input/concatenating them together on output.. That is just 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 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
-- Matt Kromer Zope Corporation http://www.zope.com/
Stored procedures worked excellent for me. Less hassle than external methods in some cases , especially if (like me) you have a Database Administrator to handle them instead of doing it yourself.. ;-) Lazyness is a great virtue on or about, Monday, May 06, 2002, we have reason to believe that Matthew T. Kromer wrote something along the lines of : MTK> Right, bind vars are the way to go. Unfortunately, Zope doesn't create MTK> bind variables for SQL methods, so you have to do it via an external method. -- Geir Bækholt web-developer geirh@funcom.com funcom oslo | webdev-team
participants (3)
-
Geir Bækholt -
Geir B�kholt -
Matthew T. Kromer