Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 24.0

You can use the Memory adapter to store data to and retrieve data from memory.

Storing Data to Memory

Using the store operation from the Memory adapter, you can store data. Provide the following parameters:

NameTypeDirectionDescription
keyStringinSet a key that can be used to access the stored value with the retrieve operation.
valueAnyinProvide the data that should be stored to the memory.

If an element with the given key already exists in memory, it will be overwritten by the Memory Adapter. In this case, no error is thrown, parameter oldValue returns the value that got overwritten.

NameTypeDirectionDescription
oldValueAnyoutIf the provided key is already present in the memory, it gets overwritten. In this case, oldValue returns the previous value. If no old value is present, oldValue is NULL.
Info

If you want to store not only single data items to memory but multiple values, we recommend using the Memory adapter with a map. This is much faster as you can store all values with one store operation call, and you can still access single values using retrieve with hasMapKey.

Retrieving Data From Memory

Using the retrieve operation from the Memory adapter, you can store data. Provide the following parameters:

NameTypeDirectionDescription
keyStringinProvide the key of the value that has been stored to memory with store. If no value with this key can be found, the Memory adapter throws error MEMADSM/9.

If no data with the given key can be found, the Memory adapter throws an error. In all other cases, value contains the data.

NameTypeDirectionDescription
valueAnyoutReturns the stored value.

Related Error Codes

Find a list of all persistent state error codes on System Errors of the Memory Adapter.

Error CodeDescription
MEMADSM/9The message is not stored here.
Panel
titleOn this Page:
Table of Contents
OtpFloatingfalse

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameMemoryAdapter_GuessingGame_Example
PageWithExcerptINTERNAL:_designer_examples
shouldDisplayInlineCommentsInIncludesfalse

rp
Panel
titleRelated Pages: