473,498 Members | 2,023 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 3273
"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
1517
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
2689
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
38837
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
1963
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
3068
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
1948
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
9414
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
4712
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
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6993
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
7375
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...
1
4899
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
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
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.