473,404 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

DB2 XMLUPDATE error executing from Java Statement

I am trying to use the XMLUPDATE stored procedure. Installed fine, and
seems to work great if I execute the statement from a sql query using
the controll center.. Doesn't work from java however. I get a 07004
error that says I must in clude a USING or INTO clause in my dynamic
query.

I inserted the USING="SQL" clause (as the documentation stated
somewhere) into the XML query but that didn't do anything.

Can anyone help me with this? the query works fine on its own.. so I'm
sure its not something really hard to correct.

Thanks :)

THE QUERY:

CALL DB2XMLFUNCTIONS.XMLUPDATE(
'<updates>
<update using=\"SQL\" action=\"append\" col=\"1\" path=\"/WishList\">
<Item>ne******@yahoo.com</Item>
</update>
</updates>',
'select wishlist from users where users_id=1',
'update users set wishlist=? where users_id=1', ?, ?)

Feb 5 '07 #1
2 1962
Most probably you have a syntax error in your query, it looks like DB2
is trying to execute the "update using" segment of your XML as an
UPDATE statement. Are you escaping special characters correctly in the
Java?
Are you using a Statement, a PreparedStatement or a CallableStatement?
The safest is to use a Statement, probably the most portable accross
JDBC Drivers.
Feb 5 '07 #2
I tried using all three types, statement, prepared and callable. all
result with the same error. the only thing I'm escaping is the
quotations in the xml update string..(<update using=\"SQL\" action=
\"append\" col=\"1\" path=\"/WishList\">
) It iss a static query since I'm just trying to get the thing to
work to begin with.. so there is no chance of unescaped characters in
the insterted information. I figured it might not be finding data to
substitute the ?s for.. but that wouldn't be an issue in a normal
statement..

Vasili

On Feb 5, 1:40 pm, "Otto Carl Marte" <Otto.Ma...@gmail.comwrote:
Most probably you have a syntax error in your query, it looks like DB2
is trying to execute the "update using" segment of your XML as an
UPDATE statement. Are you escaping special characters correctly in the
Java?
Are you using a Statement, a PreparedStatement or a CallableStatement?
The safest is to use a Statement, probably the most portable accross
JDBC Drivers.

Feb 5 '07 #3

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

Similar topics

1
by: Ike | last post by:
Anyone knows what cuases this under 6.0 ? -Ike
0
by: Rhino | last post by:
I've written several Java stored procedures now (DB2 V7.2) and I'd like to write down a few "best practices" for reference so that I will have them handy for future development. Would the...
1
by: balleyman47 | last post by:
getting the following error when executing an insert statement: java.lang.IllegalArgumentException: Date/Time must be JDBC format running on UDB 8.2 fix pack 10 using IBM type IV driver. Query...
2
by: Richard | last post by:
Our web programmer was looking in his application log an found the following error: 2006-08-31 16:33:35,129 ERROR org.hibernate.util.JDBCExceptionReporter - < SQL0723N An error occurred in a...
1
by: kommaraju | last post by:
iam a starter to db2 & jdbc.i have a servlet program which connects to ibm db2 using jdbc.when i run this using apache tomcat 4.1.34 , it is showing a error message of HTTP STATUS 500 my jdbc...
2
by: kavyak | last post by:
This is not a mere error. because,whatever input i give from jsp, its getting updated in mysql but the page is showing some internal error.The error looks like this.Plz tell me if someone knows the...
1
by: jesmi | last post by:
my code is: U]employee.cfm <html> <head> <title>Employee List</title> </head> <body> <h1>Employee List</h1>
1
by: ajos | last post by:
hi evrybdy, the problem is:- i had this running before in jsp but when i changed the jsp page using struts tags there occoured a problem... when i enter values in the 2 text boxes and click enter...
4
by: Ty | last post by:
Hello all, I am creating a web site with Visual Stuido 2008. I am trying to use a java script file to create a busybox for login from this page http://blogs.crsw.com/mark/articles/642.aspx. I...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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
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
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...

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.