INFORMIX
DataBlade API Programmer's Manual
Chapter 3: Handling Smart Large Objects
Home Contents Index Master Index New Book

Modifying a Smart Large Object

Once you have an LO file descriptor for an open smart large object, you can modify the smart large object, as follows:

The following sections describe each of these tasks.

Updating a Smart Large Object

A smart large object has two parts: its data in the sbspace and its LO handle. You can update either of these parts.

Updating Smart-Large-Object Data

To update the data of an existing smart large object, follow these steps:

    1. Use the SELECT statement to obtain the LO handle that identifies the location of the data.

    2. Open the smart large object to obtain an LO file descriptor.

    3. Read data from and write data to the open smart large object.

    4. Close the smart large object.

Important: To update data of an existing smart large object, you do not need to use the UPDATE statement to update the CLOB, BLOB, or opaque-type column. The LO handle in the column does not need to change if you only modify the smart-large-object data.

Updating the LO Handle

The UPDATE statement can store a new LO handle in a CLOB, BLOB, or opaque-type column. For the steps to update a column, see "Storing the LO Handle".

You might want to update the LO handle to:

    Overwrite the existing LO handle in the column with the LO handle for the new smart large object.

    Multiple columns can reference the same smart large object on disk. You can overwrite an existing LO handle in the column with the LO handle for an existing smart large object. Both columns now reference the same smart large object.

Altering Storage Characteristics

After you create a smart large object, you can optionally change some of its storage characteristics with the mi_lo_alter() function. This function allows you to alter the following storage characteristics:

All other storage characteristics cannot be changed once you create the smart large object. For more information on the syntax of the mi_lo_alter() function, see its description in Chapter 12, "DataBlade API Function Descriptions."




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.