Skip to Content
author's profile photo Former Member
Former Member

Data Base Error

Hi all,

I am sending the data to data base from SAP R/3 through SAP XI. I am using parent-child relation ship in the destination side. I am getting the foll. error at reciever jdbc adater side.

Error:

Last message processing started 18:01:12 2005-02-11, Error: TransformException error in xml processor class, rollback:

Error processing request in sax parser: Error when executing statement for table/stored proc.

'CUSTOMER_MASTER': java.sql.SQLException:

Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY

KEY constraint 'PK_CUSTOMER_MASTER'. Cannot insert duplicate key in object 'CUSTOMER_MASTER'.

can any body help me .

Regards,

sekhar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Feb 11, 2005 at 07:28 PM

    Hi,

    Check the primary key value in the record that you are inserting into the DB Table.

    Looks like you have already have the same primary key column value available in the DB table.

    Regards,

    Sridhar

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Sridhar,

      We have one more problem.

      Using the following XML, we are trying to update two tables which have parent-child relationship in Microsoft SQL 2000.

      But it is updating only the parent table and nothing goes into child table. Can you please advise what is wrong with this structure?

      <root>

      <StatementName1>

      <dbCUSTOMER_MASTER action="'UPDATE' | 'UPDATE_INSERT'">

      <table>CUSTOMER_MASTER</table>

      <access>

      <CUSTOMER_NUMBER>0000002155</CUSTOMER_NUMBER>

      <COUNTRY_KEY>93</COUNTRY_KEY>

      <FIRST_NAME>RAVI</FIRST_NAME>

      <LAST_NAME>RAVI</LAST_NAME>

      <AUTHORIZATION_GROUP>new</AUTHORIZATION_GROUP>

      <INDUSTRY_KEY>345</INDUSTRY_KEY>

      <ACCOUNT_GROUP>123</ACCOUNT_GROUP>

      <INITIAL_CONTACT>456</INITIAL_CONTACT>

      <COMPANY_CODE>67</COMPANY_CODE>

      </access>

      <key1>

      <CUSTOMER_NUMBER>0000002155</CUSTOMER_NUMBER>

      </key1>

      <dbCUSTOMER_ADDRESS action="'UPDATE' | 'UPDATE_INSERT'">

      <table>CUSTOMER_ADDRESS</table>

      <access>

      <CUSTOMER_NUMBER>1</CUSTOMER_NUMBER>

      <CITY>78</CITY>

      <CITY_CODE>35</CITY_CODE>

      <COUNTRY_CODE>91</COUNTRY_CODE>

      <DISTRICT>VIZAG</DISTRICT>

      <FAX_NUMBER>4567</FAX_NUMBER>

      <HOUSE_NUMBER>5678</HOUSE_NUMBER>

      <POSTAL_CODE>4566</POSTAL_CODE>

      <REGION>CA</REGION>

      <TELEPHONE_NUMBER>9866020913</TELEPHONE_NUMBER>

      </access>

      <key1>

      <CUSTOMER_NUMBER>0000002155</CUSTOMER_NUMBER>

      </key1>

      </dbCUSTOMER_ADDRESS>

      </dbCUSTOMER_MASTER>

      </StatementName1>

      </root>

      Thanks,

      Bhaskar and Sekhar

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2005 at 03:40 PM

    Hi,

    Pls try following:

    1. Use only UPDATE_INSERT as this will Update if record is already present or INERT if not present.

    2. Put the child table call in another statement. As of now you have both calls in one statement.

    Let me know your findings.

    Thanks

    Ashish

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.