Skip to content
Loading
  • +3
    Forgeni Key Name is :- tblvolunteer
     
    +3
  • Sachin Singh
    +3
    if your SP is 
    1. Create procedure UIPKGCONFIGURATION_spDeleteVolunteer  
    2. @involunteeriD INT
    3. as  
    4. begin  
    5. delete from tblcfgvolunteerfingerprint where volunteerid=@involunteeriD;
    6. delete from tblvolunteer where volunteerid = @involunteeriD;
    7. end  
    then there shouldn't be any error, what the error says? please share the screenshot.
    +3
  • Sachin Singh
    +3
    test sp by executing it as
     
    1. exec UIPKGCONFIGURATION_spDeleteVolunteer 12001  
    +3
  • +1
    System.Data.SqlClient.SqlException: 'The DELETE statement conflicted with the REFERENCE constraint "fk_tblcfgvolunteerid". The conflict occurred in database "BiometricDB", table "dbo.tblcfgvolunteerfingerprint", column 'volunteerid'.
    The statement has been terminated.'
    +1
  • 0
     i got this Error
    1. (4 rows affected)  
    2. Msg 547, Level 16, State 0, Procedure UIPKGCONFIGURATION_spDeleteVolunteer, Line 6 [Batch Start Line 15]  
    3. The DELETE statement conflicted with the REFERENCE constraint "fk_tblattendancevolunteerid". The conflict occurred in database "BiometricDB", table "dbo.tblattendancelog", column 'volunteerid'.  
    4. The statement has been terminated.  
    5.   
    6. Completion time: 2022-06-18T17:59:03.1911316+05:00  
    0