BulkCopy

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

For Primary keys exception:

bc.WriteToServer(dt, DataRowState.Added);
(for DataTable)

but what do we write for DataReader?
bc.WriteToServer(dr,?);

Thnks.
 
I haven't any problem about using BulkCopy.My problem is "primary key control".

Record which have new id will be insert on new row.
Record which have id on destination table will be update.

they are for datatable: bc.WriteToServer(dt, DataRowState.Added);
bc.WriteToServer(dt, DataRowState.Modified);

But I use SqlDataReader: bc.WriteToServer(dr);

Are there any ideas?

Thnks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top