Re: Populating 'long' data column with Ruby OCI8 (trying aga


#1

Hi, KUBO

Thank you very much for the reply. I got the following error after I
applied the patch:
/usr/local/ruby-1.8/lib/ruby/site_ruby/1.8/oci8.rb:656:in `bindByName’:
Not supported type (8)

I changed bind_param to
c.bind_param(’:data’, data, OCI8::SQLT_LNG)

If I do not change it, I end up with truncated data.

As for changing “datasize = 65535”, I did “datasize = 500000”. However,
when querying the database populated by other means with 200k long
columns, I always get back a string of size 65535. This limitation must
be in place somewhere else (inside OCI?).

Thanks again for trying to help. I ended up using OTL (C++) for
populating and updating long columns, as pure OCI interface simply
overwelms me. It would be great, though, to have support for this in
Ruby OCI8 later sometime.

Sincerely,
Gennady B…


#2

Hi,

“Gennady B.” removed_email_address@domain.invalid writes:

Hi, KUBO

Thank you very much for the reply. I got the following error after I
applied the patch:
/usr/local/ruby-1.8/lib/ruby/site_ruby/1.8/oci8.rb:656:in `bindByName’:
Not supported type (8)

Sorry, I haven’t tested it. oci8.so doesn’t support OCI8::SQLT_LNG(8).

I changed bind_param to
c.bind_param(’:data’, data, OCI8::SQLT_LNG)

If I do not change it, I end up with truncated data.

As for changing “datasize = 65535”, I did “datasize = 500000”. However,
when querying the database populated by other means with 200k long
columns, I always get back a string of size 65535. This limitation must
be in place somewhere else (inside OCI?).

Probably inside OCI. The 9th argument of OCIDefineByPos() is ‘ub2
*rlen’.
ub2 means unsigned two-byte integer, whose max value is 65535.
It needs piecewise fetch to fetch long column over 65535.