Database data import / export error: data can not be inserted in the read-only columns "Id" in.

This article is for white reference, please feel free ...... Gangster

 

This example is: vs 2017 data comes from a database localDB exported to ---- ---> corresponding database in 2008 Sql Server

1. Export database:

2. Import target database:

3. Next * n ----> completed

4. look cool after being given consecutive start:

 

The above two false premises is: my Sql Server database is to manually create a database of the same name,

Right from the database and then generates the appropriate localDB ---> task ---> Script ---> select specific database objects ---> Select All tables ---> can be saved to the clipboard

Then to the target database right ---> New Query, just paste the script ---> F5 perform ----> finished copying the database table, the data has not come, and if they lead out together, will complain, here go on a two-step

Then I start the data import / export ,,,,, I ignored the generated data table

I do not know how, and the type of data fields in the table above, all turned into a date ,,,,, unsightly error

Delete re-create the tables with a script actually good, strange!

Reproduce the error:

Resolve the above error:

The following is a table of the currently selected Enable identity insert: Double-click to open a single table to point

The following is a table Select the Enable identity insert: or the good

carry out:

 

 

To pay attention to delete the database, close the connection must be selected, otherwise it will delete failed

Guess you like

Origin www.cnblogs.com/stickcsharp/p/10959997.html