Delete Record Wizard

Deleting a certain record from a 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). table can be done in a single operation using the Delete Record Wizard, without having to manually retrieve its ID and build the recordset A recordset is the result of executing an SQL query. It is composed of multiple rows, each row having multiple columns. The columns presented in the query result depend on the column list declared in the query (they can belong to different tables). The number of rows and their order depend on the query conditions (WHERE, GROUP BY, HAVING, ORDER). The recordset acts as a source of dynamic data The InterAKT Dynamic Data tool is a replacement for the standard dynamic data dialog. It is used in the MX Kollection 3, to provide a unified way of building mark-ups, or place holders. These are recordset fields, server or session variables, and other types of dynamic data that are replaced at runtime by their corresponding values in web applications.. The wizard adds a Delete Record server behavior A server behavior is a reusable component for server-side development. They add blocks of code to your pages for accomplishing specific tasks. Dreamweaver comes with several default server behaviors and the InterAKT extensions add many more to this list. to your delete page. To edit the server behavior, open the Server Behaviors panel (Window -> Server Behaviors) and double-click the Delete Transaction server behavior.

The Delete Record Wizard is accessible from two locations:

 

The purpose of this wizard is to build a page that enables users to delete records from a database table. This wizard is divided into two steps. To build the delete page with the Delete Record Wizard, follow the next instructions:

  1. Open the page in Design view, and then apply the Delete Record Wizard. A dialog box appears.
  2. Complete the dialog box, following the instructions below for each of the two steps:
    ·  The Basic tab
    ·  The Advanced tab
  3. Click OK when done.

The Basic tab

The first step into completing the dialog box requires the user to input basic information about the transaction, like the table to delete from, the ID of the record to be deleted, and the page to which it will be redirected:

 

To set the dialog box options, follow the next steps:

  1. In the Connection drop-down menu select the database connection defined for your site; if you don't have a connection yet, you can use the Define button and create one now.
  2. In the Delete from table drop-down menu select the database table from which you want to delete records.
  3. In the Primary key column drop-down menu specify the primary key column for the current table. The content of this drop-down menu is refreshed each time the user changes the table for the delete operation. By default, the first element is selected.
  4. The Numeric checkbox specifies whether the selected Primary key column has a numeric type (integer, double, etc). The state for this checkbox is altered each time the user changes the selected value of the Primary key column according to the meta-data retrieved by Dreamweaver for the specified table column.
  5. In the Primary key equals drop-down menu select the way the record ID is passed to the delete page (either URL Parameter, Form Variable, Cookie, Session Variable, Server Variable, Entered Value), and type its name in the associated text-box.
  6. In the First Check Variable drop-down menu select which element should act as a starter condition for the delete operation (either Primary key value, URL Parameter, Form Variable, Cookie, Session Variable, Server Variable), and type its name in the associated text-box.

    Note
    : The form that performs the delete operation should have the Method attribute set to POST, not GET.
  7. In the After deleting, go to text box enter the page to be opened after the record is deleted or click the Browse... button to select the file page.
  8. The three buttons in the top right corner of the interface offer you the next functionalities:
    ·  click OK when you are done configuring the server behavior.
    ·  click Cancel to exit without applying the new settings.
    ·  the Help button opens this help page.
    These buttons appear on both interfaces of the Delete Record Wizard, so their role will not be explained again in the next step.
  9. Click on the Advanced tab to continue with configuring the wizard.

The Advanced tab

This last step of the wizard requires the user to set some transaction options:

 

To set the dialog box options, follow the next steps:

  1. In the Transaction name text box enter the desired name for the delete transaction. Be careful when choosing it, because it has to be unique on each page. By default, MX Kollection 3 assigns unique names to each transaction, and this setting should not be changed, unless you really know what you are doing.
  2. After completing the user interface, click on the OK button to apply the wizard, or Cancel to dismiss it without making any changes to your page.
 
Related Topics