Delete Files

When removing items from the database A database refers to data organized and stored on a computer that can be searched and retrieved by a computer program. Most industrial-strength and many smaller database applications can be addressed using SQL (Structured Query A query is a SQL command that will extract information from the tables of a database. Essentially, a query is a request for information from your database. Language). that have associated files stored on disk, you must implement logic that allows the related files to be deleted simultaneously.

In order to create such a page, perform the following steps:

  1. Create a page on which you add a delete transaction A transaction is a group of SQL statements whose effects are logically connected. Anything from simple queries to inserting, and deleting operations can be considered a transaction, as well as more complex groups of several statements which accomplish a specific task. that removes a record from the table. This table should be the one which has a field related to files on disk.

  2. Add the server behavior from the Application panel, Server Behaviors -> + -> MX Kollection -> File Upload -> Delete File. This action will only take place after the delete operation on the table. If the delete operation is not successful, the file will not be deleted either.

  3. The Transaction Engine will attempt to remove the file; if an error occurs, a rollback will be executed on the delete operation, so that no data will be lost.

This section contains the following topics:

Eric  King

Can you provide an exaple or link to do this?

spear  head
07-05-2006

Question:
Is there an easy way to delete multiple files associated with a single record?

Answer:
In MX Kollection 3 you cannot achieve this functionality without manually adding additional triggers that delete files.

spear  head
07-05-2006

Question:
Is there an easy way to delete multiple files associated with a single record?

Answer:
In MX Kollection 3 you cannot achieve this functionality without manually adding additional triggers that delete files.