From: thelfter on
On Nov 8, 9:09 am, yahalom <yahal...(a)gmail.com> wrote:
> I get error:
> too large for bindsize
>     while executing
> "orabind $sth :v1 2 :v2 $data "
>
> Is this because of my old oracle?
> well... looks like it is time to upgrade, I wish oracle upgrade was as
> easy as mysql upgrade...

The oralob syntax is not deprecated in the sense that it is no longer
valid.
It is a simple case, that a user, contributed the source code for a
better way.


Please increase the bindsize .

set size [string length $data]
oraconfig $sth bindsize $size
oraparse
orabind
oraexec

-Todd
From: yahalom on
> The oralob syntax is not deprecated in the sense that it is no longer
> valid.
> It is a simple case, that a user, contributed the source code for a
> better way.
>
I was not able to make it work also on oralce 10 (same error) that is
why I asked if it is deprecated. But if there is better way then
forget about it.


> Please increase the bindsize .
>
> set size [string length $data]
> oraconfig $sth bindsize $size

This makes it work.

Just for the record on oracle 9.2.0.1.0 I get a different error:
ORA-01461: can bind a LONG value only for insert into a LONG column
while executing
"oraexec $sth "
(file "test.tcl" line 8)

On oracle 10 as I said it works.

thanks again.
From: thelfter on
On Nov 11, 3:59 am, yahalom <yahal...(a)gmail.com> wrote:
> > The oralob syntax is not deprecated in the sense that it is no longer
> > valid.
> > It is a simple case, that a user, contributed the source code for a
> > better way.
>
> I was not able to make it work also on oralce 10 (same error) that is
> why I asked if it is deprecated. But if there is better way then
> forget about it.
>
> > Please increase the bindsize .
>
> > set size [string length $data]
> > oraconfig $sth bindsize $size
>
> This makes it work.
>
> Just for the record on oracle 9.2.0.1.0 I get a different error:
> ORA-01461: can bind a LONG value only for insert into a LONG column
>     while executing
> "oraexec $sth "
>     (file "test.tcl" line 8)
>
> On oracle 10 as I said it works.
>
> thanks again.

The ORA-01461 error from Oracle 9i is a bug in the Oracle. You will
see that error for many different things. For instance. If you
operate on more than 1 varchar2(4000) in a multibyte characterset.

Anyway. I'm glad it is working for you in 10g.

I'm sorry I can't be more specific, nor can I code up a 1 fix runs
everywhere code for LOBs because of the interactions with multiple
versions of the Oracle code.

LOBs are one of those areas where you just have to keep tweaking your
oratcl code to make it work.

-Todd
From: yahalom on
one more questions. I do not undersntand the bindsize. in the doc it
states:

bindsize Sets or returns the size of the buffer used
for storing bind variable values. This is
used in orabindexec and oraplexec to allow
the buffer to be reused on subsequent calls.
The default is 2000 bytes and the maximum is
4000 bytes.


it is obvoiusly wrong as 4000 is no longer a limit but does it matter
to what I set it? will it really matter if I make it longer then the
bind data. I will probabaly close the connection so anyway the buffer
will stay and be reused.

From: thelfter on
On Nov 14, 9:17 am, yahalom <yahal...(a)gmail.com> wrote:
> one more questions. I do not undersntand the bindsize. in the doc it
> states:
>
>  bindsize  Sets or returns the size of the  buffer  used
>                     for  storing  bind  variable values.  This is
>                     used in orabindexec and  oraplexec  to  allow
>                     the  buffer to be reused on subsequent calls.
>                     The default is 2000 bytes and the maximum  is
>                     4000 bytes.
>
> it is obvoiusly wrong as 4000 is no longer a limit but does it matter
> to what I set it? will it really matter if I make it longer then the
> bind data. I will probabaly close the connection so anyway the buffer
> will stay and be reused.

In the case of clob data. The bindsize is over-ridden and takes on
new meaning. In fact, the documentation is lacking.

For performance reasons, you really don't want to increase the
bindsize to a really really large number everywhere.

For clob data, it is safe to set the bindsize to the largest clob
string you are going to use. The bindpsize will determine the number
and size of pieces sent to the database in each round trip. For clob
data, the bindsize is used to inform the database how big a buffer it
is going to need to receive the clob data in pieces and re-assemble it
on the other end.

-Todd