Salesforce

File2Blb (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

File2Blb (Magic xpa 4.x)

Moves a file into a BLOB variable.

Syntax:

File2Blb (file name)

Parameters:

File name (Alpha): The name of the file to be converted into a BLOB.

Returns:

BLOB – The file packed as a BLOB.

Example:

File2Blb('C:\myfile.txt') returns a BLOB with the content of the c:\myfile.txt file.

Note:

For a large file, a crash or an Abnormal termination alert may appear due to insufficient memory. When Magic xpa loads a file into a BLOB, it first reads the entire file and then allocates memory to the BLOB variable. This results in a memory consumption that is larger than the file size itself, which may result in a crash or an Abnormal termination alert. If this file needs to be sent to the client, it is recommended to send it using the ServerFileToClient function.

The data might be converted to Ansi/Unicode. This depends on the BLOB Content.

When the file has UTF8 data without BOM, it will be treated as Ansi data. If you want to store it in a Unicode BLOB, you need to convert the UTF-8 data into Unicode by using UnicodeFromANSI(blob,65001).

Exceptions:

This function is not supported as a parameter in the Invoke Web Service Lite operation.

See also:

Blb2File

The Online and Rich Client Samples projects (program CV03 and RCV03)

Reference
Attachment 
Attachment