Welcome Guest, Not a member yet? Register   Sign In
Active Record: ERROR: ORA-01704: string literal too long
#1

[eluser]rachj[/eluser]
Hello,

I am trying to use ActiveRecord class to insert long strings into an oracle table. The error I get is below:


A Database Error Occurred

Error Number:

INSERT INTO "FEATURE" ("FEATURE_ID", "RESIDUES") VALUES ('1526', 'Here I input a very long string > 4000 charachters')

If I try this sql statement in oracle using command line, I get the error:
"ERROR: ORA-01704: string literal too long"

I would appreciate if someone could help me with how to work around this error.

Thanks
RJ
#2

[eluser]InsiteFX[/eluser]
And what is the database table field set to?

InsiteFX
#3

[eluser]rachj[/eluser]
Hi InsiteFX,

The table field is set to be clob type. While retrieving from the field works fine, its the insert that is troubling me.

Thanks
RJ
#4

[eluser]InsiteFX[/eluser]
This is what I found, mybe it will help you out!
CLOB Data Type

InsiteFX
#5

[eluser]rachj[/eluser]
Hi InsiteX,

Thanks for your input. I was hoping that Active Record would have taken care of detecting the clob type of the field and then use appropriate commands for lob type insert. I guess that is not the case and I would have to work around the code using oci8 bind variables.

Thanks for your help.

RJ
#6

[eluser]fszostak[/eluser]
Hi!

I have same problem. Any advance? Any solution for this issue?

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB