DB_UPDATE_BLOB and DBS_UPDATE_BLOB actions
Writing of one record of LOB type into the table in the database.
LOB (Large OBject) can be:
LOB (Large OBject) can be:
- BLOB (Binary LOB),
- CLOB (Character LOB),
- XMLType (CLOB for work with xml data in Oracle DB).
|handleIdent_Int||in||Identifier of Int type (handle) of the connection to a database (DB_CONNECT).|
|lobColNameIdent_Str||in||Name of LOB type column in the table.|
|lobFileNameIdent_Str||in||Name of a file, from where the read record of LOB type is to be read.|
|Identifier of the Connection to the database.|
|idKeyIdent||in||Identification key determining the row (if the key consists of several columns, idKeyIdent is a structure of the same type as the table - just values of key columns are to be taken into account).|
|strExpression_Str||in||Expression of String type, that defines the table row read.|
|dbObjIdent||in||Reference to an object of Database table.|
|Return code of Int type - action success.|
|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.
The action DB_UPDATE_BLOB allows to write one record of LOB type into a table in a database. The table is given by the identifier dbObject, that represents an object of Database table type. The 2nd and 4th declarations are concerned to DBS actions, which do not require the explicit actions to open and close the database (DB_CONNECT and DB_DISCONNECT). It is also possible to use the running transaction identifier transHanlde_Int gained by previous calling the action DB_TRANS_OPEN. The written record of LOB type is read from a file, which name is given by the identifier lobFileNameIdent_Str. Value of the identifier lobColNameIdent_Str defines a name of the column, which type is LOB and will be overwritten.
Row (or rows in dependence on the result set of corresponding rows), which will be overwritten, can be defined:
- Using the parameter idKeyIdent. An identification key must be defined in the configuration of an object of Database table type. Then a row, with a value matching the given identification key, will be found in the table.
- By a value of the expression strExpression_Str, that represents a clause WHERE for the SQL command SELECT executing a selection from the table.
The parameter retCodeIdent_Int returns the attribute _ERR_NO_ERROR - action success, or:
- _ERR_FILE_ERROR - an error occurred during operation with the file.
- Other default error codes.
The action was tested for the file of 175 MB. If the file exceeds 32768 bytes, a temporary file will be created in the current file of D2000 DBManager. After it is written into LOB it will be deleted automatically.