Home > Archive > Programming with dBASE > January 2006 > Help with delete trigger









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help with delete trigger
rb

2006-01-26, 4:54 pm

HI all,
SQL2000
I wanting to createa delete trigger that staops deleting of a record if it
is the last one in th given view
I cant seem to come up with the correct logic
I've tried if the count <=0. THat seemed to work for a while. But when I try
to delete a parent record that has a cascade delete to this table, which has
no records in it, its trigger fires saying that it cannot delete the last
row. But there is no last row, it s empty.
Obviously my logic is flawed.
Second, when deleting a parent, that has a cascade delete in the
relationship, and the child table has no related records, is the delete
command still issued thereby activating the delete trigger

Thanks
Robert



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com