Dataset::Detach

Contents

Description

Detach the Dataset object from an internal Origin data set.

Syntax

BOOL Detach( )

Parameters

Return

Returns TRUE on successful exit and FALSE on error.

Examples

EX1

void Dataset_Detach_ex1()
{
    Worksheet wks;
    wks.Create("origin", CREATE_VISIBLE);
    if (wks)
    { 
        Dataset    dsD(wks, 0);    // Attach to Origin data set wks first column
        vector vV(dsD);            // Copy Worksheet's first column data set to vector
        dsD.Detach();              // Explicitly Detach dsD from wks first column
             
        dsD.Attach(wks, 1);        // Now Attach dsD to wks second column
        dsD = vV;                  // Copy vector to data set wks second column
        dsD.Detach();              // Detach dsD from wks second column
    }
}

Remark

Detach an Origin C Dataset object from an internal Origin data set. The Dataset object can only be attached to one internal Origin data set at a time but it may be sequentially detached and re-attached as many times as desired.

See Also

Dataset::Destroy, Dataset::Attach, Dataset::Create

header to Include

origin.h