Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Datatypes for a long String 1

Status
Not open for further replies.

Roukje

Programmer
May 27, 2001
3
DE
Hi,

which ist the best datatype to store the source code of an complete htmlpage in one column. At this moment I have chosen the long datatype, but I am recieving an error that the String is too long to be inserted.

Thanks
 
You can try the clob type.
Another option is to emulate user_source table and have every line in a different row.
 
The Problem is that the error occurs when i try to insert a string which is longer that 4000 characters. but the datatype seems to be big enough. I thought the 4000 limit only refers to varchar type.
 
Not only to varchar, but nearly every type. The only types that don't have this limit are the lob types (clob in this case).
 
What language are you using for your INSERT? The longest VARCHAR2 field is 4000, but LONGs should give you 2GB, and CLOBs even longer. However, certain development tools don't truly support LONGs and CLOBs, they just treat them as VARCHAR2. Other tools, like Web PL/SQL are limited by the size of a PL/SQL VARCHAR2, which is 32760, and is the largest argument that you can pass to a procedure. Which is fine, because as far as I can determine, an HTML form can't handle a TEXTAREA bigger than that anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top