Salesforce

How Do I Share Memory Tables Amongst Contexts? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Share Memory Tables Amongst Contexts? (Magic xpa 3.x)

You cannot share memory tables directly between contexts. You can, however, store them in BLOBs and store the BLOBs using the SharedVal functions.

For example, let’s store a memory table in shared memory.

  • First we use MTblGet('4'DSOURCE,'') to pack Data source #4, a memory table, into a BLOB, b.TableBlob.

  • Then we use SharedValSet('ContextTbl',b.TableBlob) to store the BLOB in shared memory, under the name 'ContextTbl'.

Now we reverse the process.

  • First we use SharedValGet('ContextTbl') to fetch the BLOB back from shared memory.

  • Then we use MTblSet(b.TableBlob,'4'DSOURCE,'',1) to unpack the BLOB into Data source #4, the memory table.

For more information on using the MTbl functions, check the Magic xpa Help files.

For more information about using SharedVal functions, see How Do I Share Variables Amongst Contexts?.

See also

The Online Samples project (program MT08)

Reference
Attachment 
Attachment