Binary large objects (BLOBs) can be added to your database. R:BASE recognizes the following file formats for images: .BMP, .GIF, .JPG, .PCX, and .TIF. Text files can be in any ASCII format.

The recommended data type for images is LONG VARBIT, for large text files, LONG VARCHAR.

Use the INSERT or LOAD command to add binary large objects to your database. After the binary large object is loaded, the file is in the database, so you do not need the disk file. Following is an example of an INSERT command that adds a binary large object to a database:

INSERT INTO IMAGES (ID, IMAGEDATA) VALUES +  
(1, ['filename.bmp'])  
 
A binary large object cannot be edited. You can replace the binary large object by using the UPDATE command.

Images and large object data cannot be added to a database by using the menu system.

Binary large objects can be placed for viewing in forms and reports by placing the column or variable containing the binary large object in the form or report. When you run a form, you can enter or edit a reference to a binary large object by pressing [Shift] + [F10]. In an application program, you can use the SET VARIABLE command to define a variable that is equal to the file name that contains the binary large object.

Use the SHOW VARIABLE command to display an image. To display an image with the SHOW VARIABLE command, you must use the =w,h option, which defines the width and height of your image. To display an entire image in a form or report, the field for the image that is placed on the form or report must be large enough to accommodate the entire image. The image is a fixed size.

You cannot reduce the size of your image by reducing the measurements in the =w,h option, or by reducing the size of the field that was placed on the form or report. If you reduce the size of the field that was placed on a form or report, the image will be truncated.

If you use SHOW VARIABLE without the =w,h option or the SELECT command, R:BASE only shows you the file type of the image.

You can write a variable that has a VARBIT or VARCHAR data type back to a file using the WRITE command, for example:
 
WRITE .v1 TO filename  

The BACKUP and UNLOAD commands create a file with a .LOB extension for binary large objects, and a file for the data and/or structure. The Backup/Restore Database option from the Utilities menu creates files similar to a DOS backup.

See also
Data Types  
BACKUP Command  
INSERT Command  
LOAD Command  
SELECT Command  
SET VARIABLE Command  
SHOW VARIABLE Command  
UNLOAD Command  
WRITE Command