The action is a merger of the actions
DB_INSERT and DB_UPDATE
(or
DBS_INSERT and DBS_UPDATE). It works
just with one row or more rows. If inserting a row fails (for any reasons), there is an assumption
that inserting failed because of the reference integrity (unique key in database) and
the action attempts to update existing row. There will be updated the columns,
which are not part of the key, the key column(s) remains unchanged. The
action is terminated successfully only if all the rows have been inserted or
updated.
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.
Return code
Value of the parameter retCodeIdent_Int - see the table of
error codes.
It is possible to get extended error information.
Since the version D2000 v7.01.010, the action DBS_INSUPD returns an error in case that the number of
updated rows, by any row of structure,
is 0.
Description
Database table must be opened with the access rights _DB_MODIFY. Row or
structure to be inserted must be of correct structure type. All items of each
row to insert must contain valid values. There must be defined a key for
the database table.
Advantage of the action DBS_INSUPD when working with a
database table, is the possibility to leave out opening and closing the
database table (easier declaration).
Optimisation of the
DBManager process (recycling connections, prepared connections) allows to
execute the action DBS_INSUPD as quick as the
action DB_INSUPD and the time necessary for processing
the explicit command to open the database DB_CONNECT
will be saved.
0 komentárov