You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Brian Bonner <br...@paraware.com> on 2005/08/16 22:49:54 UTC

Clob support Error 54002

I'm trying to insert data into field of a table created with CLOB(100 
K).  The text is only 40K in size, but it keeps throwing an error:

ERROR 54002: A string constant starting with ''<?xml 
version=\"1.0\"?>\n\n<root>\n  <dynamic-element name=&' is too long.

Any thoughts on this?

-- 
Brian



Re: Clob support Error 54002

Posted by Brian Bonner <br...@paraware.com>.
Sunitha, I'm using a straight insert statement within "ij".  Basically 
preloading data.  I should have checked the bug database.  Thanks.

Brian



Sunitha Kambhampati wrote:

> Brian Bonner wrote:
>
>> I'm trying to insert data into field of a table created with CLOB(100 
>> K).  The text is only 40K in size, but it keeps throwing an error:
>>
>> ERROR 54002: A string constant starting with ''<?xml 
>> version=\"1.0\"?>\n\n<root>\n  <dynamic-element name=&' is too long.
>>
>> Any thoughts on this?
>>
> How are you trying to do the insert ?
>
> There is a limitation in string constants (literals) in the  text of a 
> SQL statement.   But if you use prepared statement and use dynamic 
> markers ('?') instead of a constant, you should be able to insert 
> larger values.       See  
> http://issues.apache.org/jira/browse/DERBY-102#action_56627
>
> Sunitha.



Re: Clob support Error 54002

Posted by Brian Bonner <br...@paraware.com>.
Hi Sunitha,  thanks for the reply  (I thought I had already mailed 
this.)  I was using IJ to do the insert using a string literal.

I also saw that someone else requested the ability to import/export clob 
content to/from derby.

Thanks for clarifying this.

Brian



Sunitha Kambhampati wrote:

> Brian Bonner wrote:
>
>> I'm trying to insert data into field of a table created with CLOB(100 
>> K).  The text is only 40K in size, but it keeps throwing an error:
>>
>> ERROR 54002: A string constant starting with ''<?xml 
>> version=\"1.0\"?>\n\n<root>\n  <dynamic-element name=&' is too long.
>>
>> Any thoughts on this?
>>
> How are you trying to do the insert ?
>
> There is a limitation in string constants (literals) in the  text of a 
> SQL statement.   But if you use prepared statement and use dynamic 
> markers ('?') instead of a constant, you should be able to insert 
> larger values.       See  
> http://issues.apache.org/jira/browse/DERBY-102#action_56627
>
> Sunitha.



Re: Clob support Error 54002

Posted by Sunitha Kambhampati <ks...@gmail.com>.
Brian Bonner wrote:

> I'm trying to insert data into field of a table created with CLOB(100 
> K).  The text is only 40K in size, but it keeps throwing an error:
>
> ERROR 54002: A string constant starting with ''<?xml 
> version=\"1.0\"?>\n\n<root>\n  <dynamic-element name=&' is too long.
>
> Any thoughts on this?
>
How are you trying to do the insert ?

There is a limitation in string constants (literals) in the  text of a 
SQL statement.   But if you use prepared statement and use dynamic 
markers ('?') instead of a constant, you should be able to insert larger 
values.       See  
http://issues.apache.org/jira/browse/DERBY-102#action_56627

Sunitha.