Error 8101
Severity 16
Message Body
Only when the list of columns is used and identity_insert is on can the list be '% 1! ''Specifies an explicit value for the ID column.
Explanation
An attempt is made to insert a row containing a specific Identifier value into a table containing the identifier column. However, the list of columns is not provided or set identity_insert is not enabled for the specified table.
Countermeasure
To successfully insert a specific identification row into a table containing the identification column, you must provide a list of columns and set identity_insert to on. The following example inserts ID Row 2, which defines IID as an ID column.
Table: tbltest
IID strdata
1 King
3 suyama
-- Enable identity_insert.
Set identity_insert tbltest on
Go
-- Insert the specified identity row using a column list.
Insert into tbltest (IID, strdata) values (2, 'davolio ')
Go
-- Disable identity_insert.
Set identity_insert tbltest off
Go
See
Set identity_insert
Emphasize !! Note !! In the import and export wizard, if you select "optimize multiple tables", the mark will be lost! Remember!