function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rob Waibel JrRob Waibel Jr 

Accessing values from a Summary Query

I have a greast summary query returning exaclty the information I need:
SELECT AccountId,SUM(Rollover_Points__c) FROM Contact WHERE No_Longer_w_Account__c = false AND Rollover_Points__c > 0 Group By AccountID
I open it  with a QueryResult objext (this works):
Dim qr As sForce.QueryResult = New sForce.QueryResult
            qr = SS.query(sSQL)
I want to review each record (as sObject) and place the values in my own datatable:
If qr.records.Count > 0 Then
                For Each Record In qr.records
                    nRow = DT.NewRow
                    nRow("AccountID") = Record("AccountID")
                    nRow("TotaRollOver") = Record("Unknown_Field__1")
                    DT.Rows.Add(nRow)
                Next
            End If
Record("AccountID") and Record("Unknown_Field__1") are not working.

thoughts?
Rob Waibel JrRob Waibel Jr
 Dim Record As New sForce.AggregateResult

            If qr.records.Count > 0 Then
                For Each Record In qr.records
                    nRow = DT.NewRow
                    nRow("AccountID") = Record.Any(0).InnerText.Replace(Chr(34), "")
                    nRow("TotalRollOver") = Record.Any(2).InnerText.Replace(Chr(34), "")
                    nRow("AN8") = Record.Any(1).InnerText.Replace(Chr(34), "")
                    DT.Rows.Add(nRow)
                Next
            End If