Loading the simple-large-object images with the blobload utility
The blobload utility is the program that is provided as part of the demonstration files. It uses a command-line syntax to load a byte image into a specified table and column of a database.
To load the simple-large-object images with blobload:
- Compile the blobload.ec program with the
following command:
esql -o blobload blobload.ec
- Enter blobload on the UNIX™ command line without any arguments.The following figure shows the output of this command that describes the command-line arguments that blobload expects.
- Run the blobload program to load each image
to its proper cat_picture column.
The -u option of blobload updates a specified column with a simple-large-object image. To identify which column to update, you must also use the -f, -d, -t, -b, and -k options of blobload.
10027
. The catalog_num column
is the key column in the catalog table. blobload -u -f cn_10027.gif -d stores7 -t catalog -b cat_picture -k
catalog_num 10027
Use the same command to update each of the four remaining image files, substituting the file name (-f option) and corresponding catalog_num value (-k option) of the image file that you want to load.