Home | Previous Page | Next Page   Data Manipulation > Using Smart Large Objects >

Accessing a Smart Large Object

To access an existing smart large object in the database, you need to perform the following steps. For details on a step, see the page listed under "More Information."

Step Task Smart-Large-Object Function More
Information
1. Execute a SELECT statement to obtain the LO handle of the smart large object from the CLOB or BLOB column. mi_exec( ),
mi_exec_prepared_statement( ),
mi_value( )
page Selecting the LO Handle
2. Convert the returned column value into an LO handle. C Cast page Converting an LO Handle Between Binary and Text
3. Open the smart large object that the LO handle identifies and return a valid LO file descriptor. mi_lo_open( ) page Opening a Smart Large Object
4. Read a specified number of bytes and store them in a user-defined buffer. mi_lo_read( ),
mi_lo_readwithseek( )
page Reading Data from a Smart Large Object
5. Close the smart large object. mi_lo_close( ) page Freeing a Smart Large Object
6. Free resources. mi_lo_release( ) page Freeing Resources

Figure 29 shows the first four of these steps that a DataBlade API module uses to access the smart-large-object data from the emp_picture column of the employee table (Figure 26).

Figure 29. Selecting a BLOB Column
begin figure description - This figure is described in the surrounding text. - end figure description
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]