solidDB Help : solidDB reference : solidDB SA: Function reference : SaDynDataMove
  
SaDynDataMove
SaDynDataMove copies data from the parameter named "data" to a dynamic data object (named dd). This function overwrites possible existing data.
The parameter dd must point to a Dynamic Data Object previously created with the SaDynDataCreate function.
Note SaDynDataMove copies the data. To copy just the reference rather than the data, see SaDynDataMoveRef.
Typically, the functions SaDynDataMove and SaDynDataAppend are used to set and modify the data value inside the dynamic data object. More memory will be automatically allocated when necessary and all the associated memory will be automatically deallocated when the dynamic data object is disposed of using SaDynDataFree. The user can access the data or the length using the respective functions SaDynDataGetData and SaDynDataGetLen.
The use of SaDynDataMove and SaDynDataAppend might not be feasible when the data already exists completely in a memory buffer. In addition to increasing the memory usage by keeping two copies of the same data, the overhead of the memory copy can be significant if the buffers are large. Therefore, it can be wise to directly assign the data pointer by using SaDynDataMoveRef (rather than copying by using SaDynDataMove). In this case, the user can modify or deallocate the memory buffer only after the dynamic data object itself has been freed.
See SaCursorColDynData for a more detailed discussion of "Dynamic Data" (SaDynDataT).
Synopsis
void SA_EXPORT_H SaDynDataMove( SaDynDataT* dd,
  char* data,
  unsigned len)
Parameters
The following table describes the parameters:
 
Parameters
Usage type
Description
dd
in out, use
Dynamic data object.
data
in, use
New data
len
in
Length of data (if the data is a string, this length should include the string terminator)
Return value
None.
See also
SaDynDataMoveRef
Go up to
solidDB SA: Function reference