CodeIgniter Forums
Active Record: ERROR: ORA-01704: string literal too long - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Active Record: ERROR: ORA-01704: string literal too long (/showthread.php?tid=34514)



Active Record: ERROR: ORA-01704: string literal too long - El Forum - 10-01-2010

[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


Active Record: ERROR: ORA-01704: string literal too long - El Forum - 10-01-2010

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

InsiteFX


Active Record: ERROR: ORA-01704: string literal too long - El Forum - 10-03-2010

[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


Active Record: ERROR: ORA-01704: string literal too long - El Forum - 10-03-2010

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

InsiteFX


Active Record: ERROR: ORA-01704: string literal too long - El Forum - 10-03-2010

[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


Active Record: ERROR: ORA-01704: string literal too long - El Forum - 12-21-2010

[eluser]fszostak[/eluser]
Hi!

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

Thanks!