cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy -->PI-->JDBC(MSSQL)

Former Member
0 Kudos

Hi,

I have File to JDBC receiver async scenario.My receiver DB is MSSQL server.I need to update,insert records accordingly.

So in action i have given as "UPDATE_INSERT".

Right now when i'm sending set of 5 records from sap,DB is creating 5 records for 1st time but when i send for 2nd time its throwing alert in PI saying

":Cannot insert duplicate key row in object 'tablename' with unique index 'IX_tablename'. The duplicate key value is()" and messages are getting failed in PI.

But from blog, action=UPDATE_INSERT

The statement has the same format as for the UPDATE action. Initially, the same action is executed as for UPDATE. If no update to the database table can be made for this action (the condition does not apply to any table entry), values of the table described in the <access> element are inserted in accordance with the description of the action INSERT. <key> elements are ignored in this case.

Is there any limitation in mssql  because of which UPDATE_INSERT is not working as excepted?

Please suggest me how to get response back from DB to get count of records updated.

<update_count>count</update_count>

<insert_count>count</insert_count>


Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Anitha

Check the SAP  Note 831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 / PI 7.3 JDBC Adapter

the point

19. Using UPDATE_INSERT with MS SQL Server:java.sql.SQLException Can not insert duplicate key

Regards.