on 04-10-2014 12:23 PM
Hi Experts,
I have an issue with the JDBC Update_Insert action with the SQL database.
When I tried with the Update function and Insert Function seperately the data was updating in the database fine.
When I use the UPDATE_INSERT action with the same data getting below error.
Error while parsing or executing XML-SQL document:
Error processing request in sax parser: Error when executing statement for
table/stored proc. 'CUSTMAST' (structure 'Statement'):
com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be
truncated.
And the query that was running in the background was as follows
10.04.2014 16:34:45 | Information | JDBC Adapter Receiver processing started, required QoS ExactlyOnce |
10.04.2014 16:34:45 | Information | JDBC Adapter Receiver Channel CC_Laserfische_FetchDate: processing started; party * / service SYS_DB_BIS. |
10.04.2014 16:34:45 | Information | UPDATE CUSTMAST SET COMP_CODE='ESSR', CUST_ID='20035780', CUST_NAME='PRAVEEN', CITY='HYD', PINCODE='500060', COUNTRY='IN', EMAIL='praveen@essar.com', REC_INSR_DATETIME='2014-04-10 16:34:45' WHERE (COMP_CODE='ESSR' AND CUST_ID='20035780') |
10.04.2014 16:34:45 | Information | INSERT INTO CUSTMAST (COMP_CODE, CUST_ID, CUST_NAME, CITY, PINCODE, COUNTRY, EMAIL, REC_INSR_DATETIME) VALUES ('ESSR', '20035780', 'PRAVEEN', 'HYD', '500060', 'IN', 'praveen@essar.com', '2014-04-10 16:34:45') |
When I try this query manually in the database it is working fine but when I trigger the data from SAP PI 7.1 we are facing error as mentioned above.
Please help me with this.
Thanks in advance.
Hi Praveen,
Error "String or binary data would be truncated." comes when the incoming data length is more than the length specified in Database.
Cross check the lengths in Database with your data.
Reagrds,
Sudhasree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I have checked the length of each field in database. I am sending the data which has short length for each field.
When I run the query with the same field lengths manually in the database it is working.
Also When i trigger the same data using Update action then it is working fine, but not working using UPDATE_INSERT.
Strange, actually now Update_Insert is working fine when I create a new channel and triggering the data.
But I have one more concern. when I send multiple records it is not working correctly.
suppose if I send 2 records, 1st is update and 2nd is insert. The data for the first record is updating correctly but 2nd data is not inserting in the database.
Do i need to change any mapping ?
Please help me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.