Create Cursor 'cTest' (test_key N(1), test_desc C(10)) For x = 1 to 9 Insert into 'cTest' (test_key, test_desc) Values (x, 'Desc - ' + Alltrim(Str(x))) EndFor o = NULL o = CreateObject('Session') o.AddProperty('MyData[1]') Select 'cTest' x = 0 Scan x = x + 1 Dimension o.MyData[x] Scatter Name o.MyData[x] EndScanThen you would use a Gather Statement to reverse the process or address the data directly like
? o.MyData[1].test_key ? o.MyData[1].test_descThis would handle multiple records of course. If you only needed to pass 1 record - there would be no need for the array. I have also tried creating a shape by attaching data objects to an array (3 dimension). This allows you to store fewer bytes in the event of a One_To_Many file structure.