Create the stored procedure which will look somthing like this ..
Create Proc Ins_Department(@pDept Varchar(1000))
As
Begin
--First Check if the Department exists or not if not then insert..
If Not Exists (Select DName From Department Where DName = @pDept)
Begin
Insert Department(DName)
Select @pDept
End
End
Call this proc from your front end..
Chirag