I apologise since this question is not strictly Crystal, but I nevertheless thought that someone here had the answer 😊
I am building a DataSet in memory for the purpose of reporting in
Crystal Reports and the question is simply:
while(!set.IsEOF())
{
//
Numvar = set.GetInt(0);
Stringvar = set.GetString(1);
r = t->NewRow();
r->default[0] = Numvar;
r->default[1] = gcnew String(Stringvar);
t->Rows->Add(r);
set.MoveNext();
}
(managed C++)
Is the contents of Stringvar copied to the dataset or just a pointer?
Ie is it safe to deallocate the string var after the Add()?
Or am I going about this the wrong way?