AndersG
2012-01-13 13:38:14 UTC
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();
}
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?
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();
}
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?