Using a row constructor
The second way to enter data into an IfxMRData column is to use
an unnamed Row() constructor to reference the full path name
of an operating system file that contains the text data and to indicate
whether the file is found on the client or the server machine:
INSERT INTO videos2 (id, name, description)
VALUES(
1011,
'The Sting',
Row ('/local0/excal/desc1.txt', 'client')::IfxMRData
);
The preceding example shows how to insert the contents of the operating system file /local0/excal/desc1.txt into an IfxMRData column. The looks for the file on the client machine. The unnamed Row() constructor has to be explicitly cast to the IfxMRData data type.
If the size of the file /local0/excal/desc1.txt exceeds 2 KB, the data is stored as a CLOB object; otherwise, the data is stored as an LVARCHAR object.
The contents of the operating system file are copied into either an LVARCHAR or a CLOB object; the source file /local0/excal/desc1.txt is not referenced again by the database server.
The following example is similar to the preceding one, but instead
of looking for the operating system file /local0/excal/desc2.txt on
the client machine, the looks
for the file on the server machine:
INSERT INTO videos2 (id, name, description)
VALUES(
1012,
'The Sting',
Row ('/local0/excal/desc2.txt', 'server')::IfxMRData
);