SQL DELETE (Cascading DELETE vs. TRIGGERS vs. "Manual"-DELETE)
===

I'm curently working with MS SQL Server Management Studio 2005 and i'm facing a bit of a problem, but first an extract (the important one) of my DB-schema:

----------

[imghack link to the image][1]

----------
I want to delete the test-table and everything it is connected to (is composed of).
The problem is, i can't alter the DB anymore (and really wouldn't want to, cause the program using it got too big already).
When i try to delete an entry in the test-table and cascading DELETE is turned on for the corresponding foreign key relation the DBMS won't let me do the delete, because it detected some kind of loop (probalby caused by the contr_tray-table).
When trying to delete an entry manually through my program (using a SQLCommandBuilder or cmd.ExecuteNonQuery()) i get this: "The DELETE statement conflicted with the REFERENCE constraint ..."
The same happens if i use triggers, to "cascade" the deletion process downwards.

Can anyone help me here? Thank you!

P.S.: I also tried to create a joined table where all fields belonging to the subset-table would simply be NULL where the contr_tray table had been joined to the replicate table and let the SQLCommandBuilder handle this, but my SQL skills don't seem up to par (i.e. i didn't get the SQL-syntax right)[then i could also get the distinct values for all the IDs i would need ...]

Any help would be appreciated and again thanks in advance.


  [1]: http://www.imghack.se/64885