I am new to SQL Server so please bear with me.
I'm upgrading application from Access 2000 to SQL Server 7.0.
Is it possible in SQL to have child record automatically created when you insert into parent table using system
constraints rather than triggers?
Parent table ID is linked to child table ID which is foreign key. There is one record for each ID in each table.
I've set identity on both columns. (seed=1, increment=1)
The other option I've tried is two inserts.
When trying to do two inserts with parent first then child I get the error message
Server: Msg 547, Level 16, State 1, Line 1
INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_dbApplicationList'. The conflict occurred in database 'F15SPOMaster', table 'Users', column 'ID'.
The statement has been terminated.
Thanks!
I'm upgrading application from Access 2000 to SQL Server 7.0.
Is it possible in SQL to have child record automatically created when you insert into parent table using system
constraints rather than triggers?
Parent table ID is linked to child table ID which is foreign key. There is one record for each ID in each table.
I've set identity on both columns. (seed=1, increment=1)
The other option I've tried is two inserts.
When trying to do two inserts with parent first then child I get the error message
Server: Msg 547, Level 16, State 1, Line 1
INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_dbApplicationList'. The conflict occurred in database 'F15SPOMaster', table 'Users', column 'ID'.
The statement has been terminated.
Thanks!