473,513 Members | 6,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error when inserting xml into database - string literal too long

When executing my insert statement, I am receiving the error message
'string literal too long'. The field is an xml datatype and I am
inserting the xml as a string. Do I need to convert it to a clob? What
else might I need to do? Please advise.

Thanks.

Jun 24 '06 #1
4 3277
"Nikki" <ni******@nycap.rr.com> wrote in message
news:11**********************@b68g2000cwa.googlegr oups.com...
When executing my insert statement, I am receiving the error message
'string literal too long'. The field is an xml datatype and I am
inserting the xml as a string. Do I need to convert it to a clob? What
else might I need to do? Please advise.

Thanks.


Please indicate your DB2 version and operating system and whether you are
using XML Extender.
Jun 24 '06 #2
Nikki wrote:
When executing my insert statement, I am receiving the error message
'string literal too long'. The field is an xml datatype and I am
inserting the xml as a string. Do I need to convert it to a clob? What
else might I need to do? Please advise.

Thanks.

I think the longest permissable literal in DB2 is ~32000 Bytes (not
characters in a unicode database!). So if your XML document in string
format exceeds that it will need to be CLOB and you need to bind it in
via a parameter marker or host variable.
(using parameter markers is a good thing anyway :-)
Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jun 24 '06 #3

Mark A wrote:
"Nikki" <ni******@nycap.rr.com> wrote in message
news:11**********************@b68g2000cwa.googlegr oups.com...
When executing my insert statement, I am receiving the error message
'string literal too long'. The field is an xml datatype and I am
inserting the xml as a string. Do I need to convert it to a clob? What
else might I need to do? Please advise.

Thanks.


Please indicate your DB2 version and operating system and whether you are
using XML Extender.


DB2 9 Viper on AIX

Thanks,

Nicole

Jun 24 '06 #4
"Nikki" <ni******@nycap.rr.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...

DB2 9 Viper on AIX

Thanks,

Nicole


So you are using native XML support provided in DB2 9.1 (of which you have
beta copy since it has not been released yet)?
Jun 24 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1523
by: James | last post by:
I am in the process of running my site through WC3 validation. I assume the validator at www.w3c.org cant accept cookies and so PHP is attaching &PHPSESSID=lasklijasj09jsad (or similar) to my...
1
2692
by: Azzedine | last post by:
Dear All, I compiled a project under Unix, I have got the following errors: ------------------------------------------ CC -I. -DUNIX -c XPCFileStat.C -g -o XPCFileStat.o "XPCFileStat.C",...
3
38847
by: Dave Pylatuk | last post by:
Hello, I am getting the above error when executing a large insert statement against 8.1.7. This insert statement includes a very large string value, about 8000 characters long. Is there a limit...
4
1964
by: Alan Silver | last post by:
Hello, I'm trying to use an ArrayList to do data binding, but am getting an error I don't understand. I posted this in another thread, but that was all confused with various other problems,...
7
3072
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
8
1950
by: mohit | last post by:
Hi, I am creating a web application in Web Matrix on the .NET framework. I have two directories :AddUser and FormAuth in a Directory P. AddUser contains a file AddUser.aspx FormAuth contains :...
2
9416
by: Charles Wilt | last post by:
I have a IBM iSeries (aka AS-400) running v5r3 of OS/400 that I access via a linked server from SQL Server 2000. The following select works fine: select * from...
2
415
by: Nikki | last post by:
That is correct (native xml support) I used parameter markers and it did work. I inserted it as a string. Is this the best way to do it? Or is there a better way. Thank you for your help, ...
13
4713
by: problem. | last post by:
#include <stdio.h> #include <stdlib.h> int main(void) { int a, b; float result = 0.0f; char symbol = '\0'; int loop = 0;
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.