Hi,
we have 2 DataTables in a .NET application having a Client / Parent relationship with millions of rows. This data should be inserted into a SQL Server database via SQL BulkCopy. It is possible that multiple instances of this .NET application run in parallel inserting different data to the same tables.
For the automatic generation of the primary keys We have an identity column in the parent table.
The problem is we don't know how to insert the corresponding foreign keys into the child table.
Does anybody know how to solve this 1:N relationship problem using bulkcopy? We cannot create the IDs in .NET because multiple instances might run.
Thanks Daniel