Here's what generally happens and where the problem generally arises. In the database, you have a master table with an auto-incremented ID and a detail table with an auto-incremented ID and a foreign key to the master ID. When these database tables get mapped to DataTables in a DataSet, the primary key columns are also set to auto-increment too. When you add rows to your DataTables, they generate temporary PK values and the temporary PKs from the master DataTable are used as FKs in the detail DataTable. When you save your changes, you must save new records for the master table first. Inserting the master records causes the final PK values to be generated in the database, which may not be the same as the temporary values in the DataTable. If you then try to save the detail records containing the temporary master IDs, it will fail because the FK constraint is violated. The solution is to retrieve the final IDs generated by the database back into your DataTable. How you do that best depends on the database.
While I was writing that previous paragraph, it occurred to me that I was assuming that the issue was arising when saving the data from the DataSet to the database, rather than when adding the data to the DataSet. If that is not the case, can you please provide more specific details about exactly what you did to generate that error message?