PRIM_WEB.ClobReader (PRIM_WEB.ClobReader)

Returns a CLOB as a Base64 data string

Ancestors - Object (PRIM_OBJT)

Details

Clob Reader asynchronously converts a LANSA Clob variable to a Base64 encoded string.
 
When the Clob has been read, the Completed event will be fired.

Example

In this example, a selected file is converted to Base64.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(432) Width(777) Theme(#SYS_THEME<2015Blue>)
 
   Define_Com Class(#prim_web.BlobReader) Name(#Blobreader)
   Define_Com Class(#PRIM_TEXT) Name(#Text) DisplayPosition(1) Left(18) Parent(#COM_OWNER) TabPosition(1) Top(64) Width(711) Height(345)
   Define_Com Class(#PRIM_WEB.FilePicker) Name(#FilePicker) Caption('Pick a File') DisplayPosition(2) Ellipses(Word) Height(25) Left(23) Parent(#COM_OWNER) TabPosition(2) TabStop(False) Top(15) VerticalAlignment(Center) Width(120) ThemeDrawStyle('MediumTitle') Alignment(Center)
 
   Evtroutine Handling(#FilePicker.FileSelected) File(#File)
 
      #Blobreader.Read( #File.Blob )
 
      #Text := "Reading Blob"
 
   Endroutine
 
   Evtroutine Handling(#Blobreader.Completed) Data(#Data)
 
      #Text := #Data
 
   Endroutine
 
End_Com

Properties

Name Description
ComponentClassName ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembers ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternName ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTag Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentType ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeName ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
Name Name identifies the component Inherited from Object (PRIM_OBJT)
Owner Owner owns this component Inherited from Object (PRIM_OBJT)
Parent The component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances Inherited from Object (PRIM_OBJT)

Events

Name Description
Completed Fired when the CLOB has been read
Data
CreateInstance CreateInstance is signalled when an instance of a component is created Inherited from Object (PRIM_OBJT)
DestroyInstance DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from Object (PRIM_OBJT)

Methods

Name Description
Read Read the contents of the CLOB
Clob

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020