ICubeMetaUpdateEx.AddStream

Syntax

AddStream(Tag: String; Stream: Object);

Parameters

Tag. Stream name.

Stream. Data stream.

Description

The AddStream method adds a user data stream to the replicated time series database.

Example

Executing the example requires that the repository contains a time series database with the FC identifier.

Sub Main;

Var

mb: IMetabase;

RubUpdateEx: ICubeMetaUpdateEx;

Rub: IRubricator;

ms: IMemoryStream;

Begin

mb := MetabaseClass.Active;

RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;

Rub := mb.ItemById("FC").Bind As IRubricator;

RubUpdateEx.Rubricator := Rub;

ms := New MemoryStream.Create;

ms.WriteByte(1);

ms.Seek(0, SeekOrigin.Beginning);

RubUpdateEx.AddStream("UserStream", ms);

RubUpdateEx.Save("C:\Param.zip");

End Sub Main;

After executing the example a copy of the time series database with the FC identifier is saved to the C:\Param.zip file. The file also contains the UserStream user stream.

See also:

ICubeMetaUpdateEx