IsValid
Checks the validity of an Origin C Dataset object.
BOOL IsValid( )
Returns TRUE if Dataset object is valid and FALSE if not.
EX1
void Dataset_IsValid_ex1() { // a Worksheet with at least 1 column must exist prior to execution Worksheet wks=Project.ActiveLayer(); if (wks) { string strWksColname = wks.Columns(0).GetName(); strWksColname = wks.GetPage().GetName() + "_" + strWksColname; Dataset dsA; // Dataset is not yet attached and is not valid if(dsA.IsValid()) out_str("Dataset is valid!"); else out_str("Dataset is not valid!"); dsA.Attach(strWksColname); // Dataset is now attached and is valid if(dsA.IsValid()) out_str("Dataset is valid!"); else out_str("Dataset is not valid!"); } }
Checks the validity of an Origin C Dataset object. Dataset objects are valid when they are successfully attached to an internal Origin data set.
Dataset::Attach, Dataset::Detach
origin.h