Forums
This topic is locked
delete images in two tables
Posted 02 Feb 2003 07:05:23
1
has voted
02 Feb 2003 07:05:23 gexinc gexinc posted:
Hi,After using the delete file before record, I came across a problem. I have two tables in my access 97 db. One table called reviews the other reviewimages. Now, I can add a review and a small thumbnail on one page which inserts into my review table, the thumbnail goes into a folder on the server. Then the current ID of the freshly submitted review is used when submitting reviewimages that you get directed to after submitting the data on the review page. Now you can submit as many reviewimages as you want, it keeps writing the reviewID in the reviewimages table thus associating them with the review.
The problem I am facing now is that I can only delete images from only one table and not both. Sure I can delete the data in the database out of both tables because of the one-to-many relationship, but it still leaves all the reviewimages behind, only deleting the review thumbnail image.
There has to be a way to do this, I have tried fiddling with the code with no such luck, I tried adding another delete file before record but it would not let me, nor did hard coding it in work either.
There has to be some way to accomplish this with this software.