To update data in the database, you should first lock the blocks in the database which you are going to update. To do this, do either of the following:
Send a report specification as described above, with the Output flag set to TRUE and Lock flag also set to TRUE. The data output by this report can be modified, then sent back to the database as an update.
Alternatively, if there is new or modified data ready to be loaded, a program can first use it as a report specification to lock the data blocks by setting the Output flag to FALSE and setting the Lock flag to TRUE when calling the appropriate report function.
The database can be updated either from a single string, a series of strings, or a file. Update data files can reside either on the client machine, or on the Essbase Server.
To send an update as a single string, call EsbUpdate() passing the entire string as an argument. (Note that in Windows, the string must not be greater than 32 KB long). Set the Store flag to TRUE in the call to EsbUpdate() so that the database will be updated. If the Unlock flag is also set to TRUE, any locked data blocks in the database will be unlocked once the data is updated, to allow other users to update those blocks.
To send an update as a series of strings, first call EsbBeginUpdate(), then call EsbSendString() repeatedly to send all the data (note that in Windows, each individual data string must not be greater than 32 KB long). Finally, terminate the update by calling EsbEndUpdate(). Set the Store flag to TRUE in the call to EsbUpdate() so that the database will be updated. If the Unlock flag is also set to TRUE, any locked data blocks in the database will be unlocked once the data is updated.
To send an update as a file, use the EsbUpdateFile() function, passing the data file name. Set the Store flag to TRUE in the call to EsbUpdate() so that the database will be updated. If the Unlock flag is also set to TRUE, any locked data blocks in the database will be unlocked once the data is updated.