613-518-1166 info@zimdatabases.com

ZIM Language Reference

$fromblob

< All Topics

Converts the contents of a blob field to an operating system file.

Syntax

$fromblob(blob field, destination file)

Parameters

blob field

an existing blob field from an entity set or relationship with fields

destination file

a path to an operating system file to hold the blob field contents

Return Value

A true or false value indicating whether the function could convert the contents of the blob field to the file. For example, it can fail if the destination file path is invalid.

Example

find MyEnt where MyKey=1 evaluate (let MyVariable=$fromblob(MyBlob,”c:\database\images\myphoto.jpg”))

It retrieves the record number 1 from MyEnt and then converts the blob to the file “myphoto.jpg” in that directory. Evidently, the programmer must know that the blob stored in the record number 1 is a JPG image. If the operation was successful, MyVariable will contain the value $True (or 1).

 

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents