A DBMS command object is used to execute the following operations on repository database objects:
Extract data.
Operation with table rows:
Insert rows.
Update rows.
Delete rows.
Operations with physical objects:
Create objects.
Replace objects.
Change objects.
Delete objects.
Unlike procedures, creating a database command in the repository does not create any objects on the server.
To create the DBMS command object in the object navigator:
In the web application click the Create button in the main menu and select the object type on the New Object side panel.
In the desktop application:
Select the Create > Other > DBMS Command context menu item.
Select the New Object > Other > DBMS Command item in the Create group on the Home ribbon tab.
After executing one of the operations a DBMS command creation wizard opens containing the pages:
Basic Settings/Basic Properties. Object name, identifier and comment are set.
Parameters. A list of parameters is created.
DBMS Command. Determines settings and specifies the SQL query, which is used to make changes in database objects.
To start DBMS command, execute one of the operations:
In the web application:
Select the Open item in the object's context menu.
Select the Open in a New Tab item in the object's context menu.
Select the Open in a New Window item in the object's context menu.
Double-click the object.
In the desktop application:
Click the Open button in the Open group on the Home ribbon tab.
Click the Open > In Default Tool button in the Open group on the Home ribbon tab.
Select the Open item in the object's context menu
Double-click the object.
The result of running a DBMS command is the number of processed records.
NOTE. The DBMS command is run within the transaction created by the platform. This should be taken into account in the script that uses custom transactions.
If the repository connected to version control system, the DBMS command can be added to the system to control changes in its version. To do this, select the Add to VCS context menu item for the DBMS command in the object navigator. After adding the object to VCS server one can track its changes. Version control system stores DBMS command text and parameter settings. For details about working with objects added to the version control system, see the Developing Applications in a Team section.
See also:
Example of Creating a DBMS Command | Data Handlers in DBMS | ISQLCommand