Share via


BLOB Data Type

A binary large object (BLOB) is a complex data type. Variables of this data type differ from normal numeric and string variables in that BLOBs have a variable length.

The maximum size of a BLOB is 2 GB.

Remarks

Use BLOBs to store memos (text), pictures (bitmaps), or user-defined types.

Note

You cannot view text that is stored in BLOBs from the development environment.

You can read from and write to BLOBs by creating input and output streams, respectively. To do so, use CREATEINSTREAM Function (BLOB) and CREATEOUTSTREAM Function (BLOB).

For more information, see InStream and OutStream Data Types.

To optimize performance, when you access a record that has a BLOB field, the data in the BLOB is not always read into memory. You must call the CALCFIELDS Function (Record) to read the BLOB into memory and calculate it. Then you can use the BLOB in C/AL code or display it in the application.

It is not supported to insert a BLOB field into a Variant.

It is not supported for a page to access a BLOB field from a table other than the SourceTable of the page.

Differences Between Microsoft Dynamics NAV 2013 R2 and Previous Versions

In previous versions of Microsoft Dynamics NAV, if you wrote to a BLOB OutStream but did not insert or modify the record in the database, and then called the CALCFIELDS function on the BLOB field, you would get the value of the BLOB based on what you wrote to the OutStream, not based on what was currently in the database. In Microsoft Dynamics NAV 2013 R2 in the same scenario, you get the value of the BLOB that is in the database. Similarly, in Microsoft Dynamics NAV 2013 R2 if you call the CALCFIELDS Function on a new record that has not been inserted into the database, then you clear the BLOB field from the record.

See Also

Reference

CREATEINSTREAM Function (BLOB)
CREATEOUTSTREAM Function (BLOB)
HASVALUE Function (BLOB)
Variant Data Type