on 09-08-2007 8:30 AM
Hello all,
Iam trying to insert data to Db2 Database using the JDBC adapter.
But It is throwing an error :
<b>
Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAPTESTLIB.SEFPTINDT' (structure 'Statement'): java.sql.SQLException: [SQL0104] Token 1 was not valid. Valid tokens: ) ,</b>
SAPTESTLIB is the Library name
SEFPTINDT table name
I have tried giving the SAPTESTLIB/SEFPTINDT even then it is giving the same error.
Generated Log ::
INSERT INTO SAPTESTLIB.SEFPTINDT (ITSTTS, ITOVRD, ITDIVSN, ITINNO, ITINSLNO, ITINDT, ITINTY, ITORTY, ITORNO, ITORDT, ITMOCD, ITCHAS, ITVIN, ITCUST, ITUSN, ITJBNO, ITJBCD, ITJBTY, ITPTNO, ITPTNM, ITQNTY, ITUOM, ITJBSTDT, ITJBSTTM, ITRGNO, ITCUGR, ITVHTY, ITLVTY, ITPTFRAN, ITPTBRCD, ITPNABRCD, ITPNAFRAN, ITPNANO, ITRFDOCTY, ITRFDOCNO, ITSPED, ITQTFRAN, ITQTBRCD, ITQTPX, ITQTNO, ITSPLIT, ITWRCAT, ITOVRRSCD, ITUSID, ITRCDT, ITRCTM, ITLUDT, ITLUTM, ITLUPG) VALUES (C, C, C, Str 2, 11, 19990124, C, C, Str 1, 19990124, Str 7, Str 5, Str 6, Str 15, This is a string 10, C, Str 12, C, Str 13, Str 14, 16, C, 19990124, 153345, Str 8, C, C, Str 9, C, 17, 22, C, Str 23, C, Str 19, 24, C, 20, Str 21, Str 21, C, C, Str 4, Str 3, 19990124, 153345, 19990124, 153345, Str 25)
Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAPTESTLIB.SEFPTINDT' (structure 'Statement'): java.sql.SQLException: [SQL0104] Token 1 was not valid. Valid tokens: ) ,.
nable to execute statement for table or stored procedure. 'SAPTESTLIB.SEFPTINDT' (Structure 'Statement') due to java.sql.SQLException: [SQL0104] Token 1 was not valid. Valid tokens: ) ,.
Regards
Gangaprasad
Hi,
>>>Str 1
Check this. What is the data type for this field. Does it allow empty space?
Execute the same stmt in AS400 system and trace the error. Try to get help from your DB/AS 400 guy.
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Prasad,
Which document format are u using?I mean the target structure!!
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
<i>INSERT INTO SAPTESTLIB.SEFPTINDT (ITSTTS, ITOVRD, ITDIVSN, ITINNO, ITINSLNO, ITINDT, ITINTY, ITORTY, ITORNO, ITORDT, ITMOCD, ITCHAS, ITVIN, ITCUST, ITUSN, ITJBNO, ITJBCD, ITJBTY, ITPTNO, ITPTNM, ITQNTY, ITUOM, ITJBSTDT, ITJBSTTM, ITRGNO, ITCUGR, ITVHTY, ITLVTY, ITPTFRAN, ITPTBRCD, ITPNABRCD, ITPNAFRAN, ITPNANO, ITRFDOCTY, ITRFDOCNO, ITSPED, ITQTFRAN, ITQTBRCD, ITQTPX, ITQTNO, ITSPLIT, ITWRCAT, ITOVRRSCD, ITUSID, ITRCDT, ITRCTM, ITLUDT, ITLUTM, ITLUPG) VALUES (C, C, C, Str 2, 11, 19990124, C, C, Str 1, 19990124, Str 7, Str 5, Str 6, Str 15, This is a string 10, C, Str 12, C, Str 13, Str 14, 16, C, 19990124, 153345, Str 8, C, C, Str 9, C, 17, 22, C, Str 23, C, Str 19, 24, C, 20, Str 21, Str 21, C, C, Str 4, Str 3, 19990124, 153345, 19990124, 153345, Str 25)</i>
Please check the values and datatype for Column . It shuold match .
Regards,
V.Rangarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rajan,
Thanks for your reply,
Datatypes are not matching ,while inserting the data in Database String should be in
Single Quotes.But here Query generated does not have the singlequotes.
I have used hasQuot attribute also .But it gives the same error and same query is generated.
Regards
GangaPrasad
If you are sure of quotes then use concatenate function in mapping & add quote to the values which you are tryng to insert. It will definitely create query with quotes.
Also try to manually insert the data into DB2 with the same values as mentioned in ur post directly on DB2 screens with the help from ny DB2 developer. You will come to know exactly which field or value is creating problem.
Regards
Sushil
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.