Skip to Content
0
Former Member
Apr 10, 2014 at 11:23 AM

JDBC UPDATE_INSERT not working

267 Views

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.