Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 96933
BY: Kubo Takehiro (kubo)
DATE: 2011-08-27 08:25
SUBJECT: RE: char(1) causes 'negative string size' error

 

This issue is fixed by ruby-oci8 2.1, which will be release in a few weeks or months.

You need to set the following code just after "require 'oci8'."

OCI8.properties[:length_semantics] = :char

If it is :char, the length of Oracle strings is counted by characters. If :byte, it is by bytes.
The default setting is :byte because :char doesn't work well on Oracle 9i though it works fine on Oracle 10g.


Thread View

Thread Author Date
char(1) causes 'negative string size' errorRonald Roy2010-03-02 01:22
      RE: char(1) causes 'negative string size' errorKubo Takehiro2010-03-03 12:16
            RE: char(1) causes 'negative string size' errorKubo Takehiro2010-03-14 23:44
                  RE: char(1) causes 'negative string size' errorKubo Takehiro2011-08-27 08:25

Post a followup to this message