did i confine fk right..
i have 4 tables
category table(id,subject)
users table(id,username,password)
question table(id,user_id(fk),cat_id(fk),title,bodytext)==set 2 fk to user table and categorytable
reply table(id,userr_id(fk),questionn_id(fk),titlerep,bodytextrep)==set 2 fk to question table and user table
set all pk and fk as int and not null.
all relationship are correct. but with field questionn_id in reply table i have problem espesialy when i click in insert button and it wann read from a datalist with label face with this error:
Error:The INSERT statement conflicted with the FOREIGN KEY constraint "FK_forumreply_forumquestions". The conflict occurred in database "forum", table "dbo.forumquestions", column 'ID'. The statement has been terminated.
but when i give by hand as 8 number it insert successful.
cmd.parameters.addwithvalue("questionn_id,"8");correct
but cmd.parametes.addwithvalue("questionn_id",lbltext.text)==error
did i miss sth in define?i should add i force to delete reply table once and create it again with all pk and fk and relationship