Table must be opened with the access
_DB_MODIFY.
In the first case (versions with the rowIdent
parameter), the deleted row is determined by a value of the key items in a value of Structure type parameter rowIdent
. The particular row is to be found and deleted according to the key items. The values of all key items in rowIdent
must be valid, otherwise the deleting will not take place, it will end with an error and %GetLastExtErrorCode() will return error 667.
In the second case, the expression of String type (strExpression_Str
), which result value is used as
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
WHERE |
clause for the SQL command
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
DELETE, |
is the condition to delete. In this case, a value of the key item is not used and may not be adjusted. If there is more rows in a table which meet the condition (
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 non-standard 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
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
TRANS |
.
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
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
TRANS |
.