I have 2 table Table A, Table B.
Table A - Parent Table
ID - Uniqueidentifier not null(PK)
Table B -Child Table
ID - uniqueidentifier null(FK, TableA)
I have a stored procedure to insert data into Table B, but when I tried to insert a null value into column ID of table B, this error came up:
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tableB_tableA". The conflict occurred in database "database name", table "table A", column 'ID'.
The statement has been terminated.
The insert statement in asp.net is like so:
sqlcommand.parameter.add(New Sqlparameter("ID", Nothing))
I am guessing adding nothing to the null value column is the problem, but i don't know how to fix it... can any1 help me?