Data shaping and GETROWS

Results 1 to 2 of 2

Thread: Data shaping and GETROWS

  1. #1
    Janne Guest

    Default Data shaping and GETROWS

    Hi! Someone out there who knows anything about datashaping and the GetRows-method?<BR><BR>I&#039m retrieving a hierarchical recordset:<BR><BR>SHAPE {select * from Products} " & _ <BR> "APPEND ({Select * from ProductVersions} " & _<BR> "RELATE ProductKey TO ProductKey) AS chapProductVersions"<BR><BR>THE RESULT, when read keeping the recordset open:<BR><BR>Product A<BR> - green 15 dollars<BR>Product B<BR> - blue 10 dollars<BR> - green 12 dollars<BR>etc.<BR><BR>Since I want to release the database connection and close the rs as soon as possible, I would like to put the hierarchical rs in an array using GetRows. Like this: myArray = rs.GetRows<BR><BR>The problem: I&#039m not able to retrieve the subrecords from the resulting array. I can only access Product A, Product B (Like myArray(0) but when trying to read the colors, I get an array out of bound <BR><BR>According to documentation, a referece to the subrecordset is put in the last field of the master recordset. So in MyArray(1,0) there should be the recordset containing blue.<BR><BR>But is it possible to reference this "blue"-value in the array. when trying myArray(1,0,0), the array is out of bound...<BR><BR>Anybody got a clue?<BR><BR>Thanks ! :)

  2. #2
    Join Date
    Dec 1969

    Default RE: Data shaping and GETROWS

    A VERY good question. I&#039ll suggest a compromise - getrows the inner (child) recordset as you loop through the outer recordset. you&#039ll cut down the amount of time spent in a loop, certainly.<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts