Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Reference Index > Binary Large Objects (BLOB)

Using Commands with BLOBs

Scroll Prev Top Next More

Use the INSERT or LOAD commands 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'])

 

 

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.

 

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.

 

See also:

 

Data Types

RBBEDIT

R:BASE BLOB Editor

SELECT