You are trying to assign an explicit value for the identity column instead of leaving database create one to you when you are inserting data.
You are doing something like:
insert into MyTable (Id, Code, Name, dob) VALUES (1, 'XXX', 'xxx', 'xxx', somedate)
instead of
insert into MyTable(Code, Name, dob) VALUES ('xxx', 'xxx', somedate)