Oracle string literal too long error

Hello Forum Folks

I’ve written a lovely app for writing new stories. Unfortunately our
company has a Oracle Database and insists that everyone use it.

The main body of each of my new stories is stored in a CLOB which can
store more than enough data for the stories. However there is a 4000
char limit on the size of String literals in SQL statements in Oracle
that I don’t know how to get round.

So I can use rails just fine as long as the length of the story is less
than 4000, and even then it’s not the storage that’s the problem it’s
the inserting that fails.

Because Rails does all of it’s database interaction via SQL and I can’t
insert big stories via SQL am I stuffed? or is there a way around it.
I’m quite happy to go hacking around the Rails Oracle Driver if that’s
what required but I thought I’d ask the question here first because I’m
sure I’m not the first to get caught out by this problem. Plus if I do
need to hack the Oracle rails driver then if someone could give me a
hint as to where to start that would be great.

Any help is really appreciated.
Thanks
Tom

On 11/17/06, Tom S. [email protected] wrote:

The main body of each of my new stories is stored in a CLOB which can
store more than enough data for the stories. However there is a 4000
char limit on the size of String literals in SQL statements in Oracle
that I don’t know how to get round.

I almost told you to forget CLOBs because it’s a pain to work with them,
but
found out that they are useable (you can even search/update them!) with
recent (>= 9) Oracle versions.

However, searching google for CLOB Oracle Rails found a rails patch:
http://dev.rubyonrails.org/ticket/4748

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs