I have parent and a child tables where child table contains reference of a foreign key to primary key in a parent table. If I try to insert a record via Microsoft SQL Server Management Studio into child table once there's a same record in a parent table - it acts as should.
The problem comes when trying to do the same in Visual Studio which returns an error:
An explicit value for the identity column in table 'child_table' can only be specified when a column list is used and IDENTITY_INSERT is ON.
All I was able to find that you enable it just temporary, is it possible to have it always on? Or maybe there's another solution? Thanks for ant explanation.