Home > Back-end >  Insert SQLServerBulkCopy composite primary key table
Insert SQLServerBulkCopy composite primary key table

Time:12-17

Now use is essentially a database project, involved in mass data insert, I don't know my way around the database, see can be quickly inserted with SQLServerBulkCopy online, I will try to use the first data table design is a single primary key, use the insert is no problem, but now the table into a pair of primary keys, the same code inserts are leaving this time error, do not check all kinds of Internet data (outer net network all have no, may be I'll find the posture of)... Ask you a great god, SQLServerBulkCopy support composite primary key? How to deal with support need? Thank you for the great god,

CodePudding user response:

In line with the primary key you don't have the custom, you will make application ID generator

CodePudding user response:

Can randomly change the table structure so I wouldn't be so upset, at present this data to docking with other system, this change also should change over there, very trouble, in fact, I just want to know sqlBulkCopy does not support the composite primary key, does not support it or change the structure or changed my way...
  • Related