The DESCR() function returns TEXT data, which is the encoded descriptor for the TEXT or BYTE data column. The encoded descriptor is 112 bytes. Use it as a column value in INSERT and UPDATE statements as a way to create additional pointers to existing TEXT and BYTE data on the optical platter. Before the descriptor is inserted in a data row, it is decoded and validated to verify its consistency and legitimacy. The optical-storage subsystem performs all encoding, decoding, and validations through calls by the Optical Subsystem to API functions. If the validation fails, the insert operation fails.
The DESCR() function is designed for WORM optical media only.
In the following example, the DESCR() function is used in an INSERT statement to fill the picture column of the pictures table with pointers to existing TEXT and BYTE data from the catalog table:
INSERT INTO pictures (stock_num, picture) SELECT stock_num, DESCR(cat_picture) FROM catalog WHERE manu_code = 'HRO'Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]