posted 11 years ago
I have a dataset xml (input.xml) file for a table "Trade".
Trade table has a column "desc_id" which is foreign key for table "Desciption" column "id".
In both the tables, the id is auto-increment by the Database.
If i dont specify any value for "desc_id" in the below input.xml, i get an error "desc_id could not be null..."
If i specify any random value, i get the error "com.sybase.jdbc3.jdbc.SybSQLException: Foreign key constraint violation occurred..."
Please suggest me how to deal with this.
Here is my input.xml:
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
<trade version="1" is_latest="true" status="DONE"
user_information="XXXXXX500005" upstream="ABC"
format="REAL" create_datetime="2012-06-20 00:00:25" />
<trade version="1" is_latest="true" status="DONE"
user_information="YYYYY500005" upstream="HKK"
format="FPB" create_datetime="2012-06-20 00:00:25" />
<trade version="1" is_latest="true" status="SENT"
user_information="ZZZZ500005" upstream="SCC"
format="REAL" create_datetime="2012-06-20 00:00:25" />
</dataset>