Vidíte historickú verziu tejto stránky. Pozrite si aktuálnu verziu.

Porovnať s aktuálnou verziou Zobraziť históriu stránky

Verzia 1 Ďalej »

DB_READ_BLOB and DBS_READ_BLOB actions


Function
Reading of one record of LOB type from the table in the database.
LOB (Large OBject) can be:
  • BLOB (Binary LOB),
  • CLOB (Character LOB),
  • XMLType (CLOB for work with xml data in Oracle DB).

Declaration
DB_READ_BLOB handleIdent_Int, lobColNameIdent_Str, lobFileNameIdent_Str, retCodeIdent_Int, idKeyIdent [ORAHINT hintIdent_Str]
 
DB_READ_BLOB handleIdent_Int, lobColNameIdent_Str, lobFileNameIdent_Str, retCodeIdent_Int WHERE strExpression_Str [ORAHINT hintIdent_Str]
 
DBS_READ_BLOB dbObjIdent, lobColNameIdent_str, lobFileNameIdent_Str, retCodeIdent_Int, idKeyIdent [TRANS transHandle_Int] [ORAHINT hintIdent_Str]
 
DBS_READ_BLOB dbObjIdent, lobColNameIdent_str, lobFileNameIdent_Str, retCodeIdent_Int WHERE strExpression_Str [TRANS transHandle_Int] [ORAHINT hintIdent_Str]


Parameters
handleIdent_Int in Identifier  of Int type (handle) of the connection to the database (DB_CONNECT).
lobColNameIdent_Str in Name of a column of LOB type in the table.
lobFileNameIdent_Str in Name of a file, where the LOB type record read is to be written.
transHandle_Int in 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 type.
retCodeIdent_Int out 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.

Return code
The value of the parameter transHandle_Int. See the table of error codes. It is possible to get extended error information.
Description
The action allows to read one record of LOB type from a table in a database. The table is defined either by the parameter handleIdent_Int, which was got by previous calling the action DB_CONNECT or by the identifier dbObjectIdent representing an object of Database Table type. The 3rd and 4th types of the declarations is concerned to DBS actions, which do not require the explicit actions to open and close the database (DB_CONNECT and DB_DISCONNECT). Also it is possible to use the identifier running transaction transHanlde_Int gained by previous calling the action DB_TRANS_OPEN.
The read record of LOB type is written into a file, which name is given in the parameter lobFileNameIdent_Str. If the file already exists, then will be overwritten.
A value of the identifier lobColNameIdent_Str defines a name of the column, which type is LOB and will be read.

A row, which will be read, can be defined: 

  1. 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.
  2. 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:

  1. _ERR_FILE_ERROR - an error occurred during operation with the file.
  2. _ERR_NO_DATA - if the record in the database is NULL.
  3. Other default error codes.

Note
The action was tested for the file of 175 MB.

Related pages:

  • Žiadne štítky