myStoreModule.CreateStore(storeName[, description][, maxValueSize][, isUserSpecific][, timeoutInSeconds]);
| myStoreModule | The name of the Store module instance |
| storeName | A STRING naming the store to create; this cannot be an empty string; REQUIRED |
| description | A STRING describing the purpose of the store; may be an empty string; OPTIONAL, defaults to an empty string |
| maxValueSize | The maximum size of any value stored within this store, in bytes; use a value of zero to indicate an unlimited maximum size; OPTIONAL, defaults to 1024 |
| isUserSpecific | If TRUE, this store will be visible only to the user indicated by the (username, userPW) arguments provided when the module was defined; if FALSE, the store will be global and visible to all users; OPTIONAL, defaults to FALSE |
| timeoutInSeconds | The number of seconds to wait for the underlying SOAPCALL to complete; set to zero to wait forever; OPTIONAL, defaults to zero |
| Return: | A CreateStoreResponseRec RECORD. If the store already exists then the result will show succeeded = FALSE and already_present = TRUE. |
The CreateStore function creates a key/value store if it has not been created before. If the store has already been created then this function has no effect.
Example:
IMPORT STD;
myStore := STD.System.Store('myusername', 'mypassword');
// Create a global store
result := myStore.CreateStore('MyApplicationStore', 'Store for application data', 2048, FALSE);
OUTPUT(result.succeeded);
OUTPUT(result.already_present);
// Create a user-specific store
privateResult := myStore.CreateStore('MyPrivateStore', 'My private data', 4096, TRUE);
OUTPUT(privateResult.succeeded);See Also: CreateStoreResponseRec