From: KUBO Takehiro Date: 2006-01-19T11:45:57+09:00 Subject: Re: Populating 'long' data column with Ruby OCI8 (trying again, need a solution badly) Hi, "Gennady Bystritsky" 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. -- KUBO Takehiro email: kubo@jiubao.org web: http://www.jiubao.org GnuPG fingerprint = 5F7B C8EF CA16 57D0 FDE1 9F47 C001 1F93 AC08 2262