User Tools

Site Tools


filetoblob_copy_data_from_a_file_to_a_blob_field_.htm
Navigation:  Advanced Topics > Clarion Language Utilities >====== FILETOBLOB (Copy data from a file to a BLOB field) ====== Previous pageReturn to chapter overviewNext page

FILETOBLOB( filename, bloblabel )

blk2blue.jpg

FILETOBLOB Copy the contents of a file to a BLOB field.
filename A string constant or variable that names the input file to copy to a BLOB field.
bloblabel The fully qualified label of the BLOB field. (Example: Customer.BlobImage)

FILETOBLOB is used to copy the contents of a file to a BLOB field. If the copy was unsuccessful, FILETOBLOB returns the ERRORCODE posted.

To add support for this utility to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program:

INCLUDE('CWUTIL.INC'),ONCE

Return Data Type:     SIGNED

Example:

IF FILETOBLOB(GLO:ImageFilename, CUS:ImageBlob)  !returns an ERRORCODE if copy fails

 MESSAGE(CLIP(GLO:ImageFilename) & ' was not copied -  ERRORCODE: ' & ERRORCODE())

END

See Also:

BLOBTOFILE

BLOB

filetoblob_copy_data_from_a_file_to_a_blob_field_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1