You are here: Reference > Activity methods > RDB-Delete

  RDB-Delete method

Use this method to delete a row or rows from an external relational database using SQL. This method operates in conjunction with an SQL statement in the Delete tab of a Connect SQL rule (Rule-Connect-SQL rule type) that contains the DELETE, TRUNCATE or DROP SQL statement.

On the Delete tab of the Connect SQL rule, use the special data syntax described in Connect SQL rules — Data mapping.

Use Connect SQL rules and the RDB-Delete method only with an external database. Do not use Connect SQL rules or RDB- methods to update the PegaRULES database. Because not all properties in the Pega 7 Platform databases are exposed as distinct database columns, use the Obj-Open and Obj-Save methods, not the similar RDB- methods, with the PegaRULES database to prevent loss of data.

Parameters

This method has four parameters. Three required parameters together identify a Connect SQL rule. The final parameter controls a processing option.

Parameter

Description

ClassName

Identify the class of the step page. The system uses this value as the Applies To key part of the Connect SQL rule that defines the delete.

Note: Identify the exact class of the rule. The system does not use class inheritance to find the Connect SQL rule.

RequestType

Enter the third key part — Request Type — of the Connect SQL rule containing the delete operation.

Access

Enter the second key part — Package Name — of the Connect SQL rule (by convention MSSQL, Oracle, DB2, UDB, or Sybase, but not restricted to these values).

RunInParallel

Select if you want processing for the connector to continue in a separate requestor, in parallel with the current requestor.

Clear if you want processing in this requestor session to pause until the connector processing completes.

If selected, use the Connect-Wait method later in the current or a later activity to access results from the connector.

Results

This method first retrieves the Connect SQL rule identified by the first three parameters, using rule resolution.

It accesses the SQL text in the Delete tab of that rule and converts any property, class, or table references in the context of the current clipboard.

It sends the resulting SQL to the external database, which performs the deletions.

When the RunInParallel box is selected, the SQL operation occurs in a new requestor session. This temporary requestor has the same access group and clipboard as the original. At most 10 such child requestor sessions can be active at once.

Each RDB-Open, RDB-Save, and RDB-Commit method involves an SQL database commit operation. You cannot implement SQL transaction commit operations across multiple Connect SQL rules.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

When a {SQLPage:pagename} directive appears as the first line of the SQL code on the Delete tab, a top-level page named pagename is created. If errors occur, properties on that page contain additional error details. (When RunInParallel is selected, this page is not available to the original requestor.)

Related topics About Connect SQL rules
Connect-Wait method
Connect SQL form — Data Mapping
About the Performance tool

Methods and instructions by function