DB_DELETE and DBS_DELETE actions
|handleIdent_Int||in||Identifier (handle) of Int type of the connection with a table (DB_CONNECT).|
|dbObjIdent||in||Reference to an object of Database table type.|
|retCodeIdent_Int||out||Return value of Int type- action success.|
|rowIdent||in||One structure row identifier.|
|strExpression_Str||in||Expression of String type, which identifies rows to delete. If the expression is parameterized, the keyword BINDIN and the values of parameters (structRowIdent or varIdent1, varIdent2, ...) are mandatory.|
|in||List of objects, constants or local variables, which will specify the values of parameters of parameterized SQL expression strExpression_Str.|
|structRowIdent||in||Reference to a row of local variable of Record type or to a row of structured variable. The row's values will specify the values of parameters of parameterized SQL expression strExpression_Str.|
|transHandle_Int||in||Identifier of the Connection to the database.|
|hintIdent_Str||in||Expression of String type that defines Oracle SQL hint.
It is used as an instruction for the performance optimizer of SQL
command. The value is used without the opening and
terminating characters /*+ <orahint>
The example is mentioned here.
In the first case, there is deleted just one row determined by a
value of the key item in a value of Structure type (
The particular row is to be found and deleted according to the key
In the second case, the expression of String type (
which result value is used as
strExpression_Str), they all are to be deleted.
The advantage of the action DBS_DELETE at work with a table is the possibility to leave out its closing and opening (shorter code).
For D2000 v5.00: an disadvantage of the action DBS_DELETE
is in speed. Each DBS_DELETE call results in necessity
to open and close the database in DBManager - it can be a
time-consuming operation and it is a comparatively nonstandard method
in term of databases.
The need to open and close the database may be avoided in the scope of transaction processing so that the command is followed by the parameter
For D2000 v6.00 and higher: DBManager optimization (connection recycling, predefined connections) causes the action DBS_DELETE to execute as quick as the action DB_DELETE and as moreover there is saved a time required for execution of the action DB_CONNECT to open the database.
The need to open and close the database may be avoided in the scope of transaction processing so that the command is followed by the parameter.
If the condition (
strExpression_Str) is met for all rows of a table (e.g. "1=1"), its entire contents is to be deleted.