![]() |
DataBlade Developers Kit Tutorial |
Tutorial Exercise 7Using Smart Large ObjectsThis exercise demonstrates creating a DataBlade module that handles smart large objects. Smart large objects allow you to store large data files in a way similar to that used by an operating system file system, while controlling, accessing, and altering files with the database server. A smart large object has two parts:
For more information on smart large objects, see the DataBlade API Programmer's Manual. The Poem DataBlade module creates one new opaque data type, Poem, and the internal support routines the database server uses to process the Poem data type. The Poem data type contains a single member: a handle to a smart large object. The data for the Poem data type are XML files, each containing a poem. Tutorial StepsThis exercise has 11 steps. It takes approximately one hour to complete.
Because you are creating smart large objects, you must have a default sbspace defined in your database server. If you do not have an sbspace, BladeManager does not register your DataBlade module. BladeManager can execute a routine, SYSBldTstSBSpace(), during registration to check for the required sbspace. If the sbspace is found, BladeManager successfully registers the DataBlade module. If the sbspace is not found, BladeManager does not register the DataBlade module, and an error appears in the registration log explaining the problem. You instruct BladeManager to run SYSBldTstSBSpace() by adding a custom SQL file to your DataBlade module project.
See " Generating Code" for detailed instructions. BladeSmith generates the basic C code and SQL scripts necessary for your DataBlade module to run:
The BladeSmith portion of this exercise is complete; you can exit BladeSmith.
Copyright © 1998, Informix Software, Inc. All rights reserved. |