SAapi Object : RunQuery Method |
Return records from this record to the end of the record set. For example, if FromRecord is 8, records 0 to 7 are not returned. All records from the ninth (index = 8) on are returned.
Visual Basic |
---|
Public Function RunQuery( _ ByVal DomainName As String, _ ByVal ProjectName As String, _ ByVal SqlQuery As String, _ ByVal MaxRecords As Long, _ ByVal FromRecord As Long _ ) As String |
Return records from this record to the end of the record set. For example, if FromRecord is 8, records 0 to 7 are not returned. All records from the ninth (index = 8) on are returned.
In both <ColumnLables> and <Rows>, the tag <_n> indicates the column number in the SQL results.
In <ColumnLables>, the text of the element is the name of the column.
In <Rows>, the text of the element is the value of the column.
Private Sub RunQuery() 'The following Visual Basic example runs an SQL statement ' showing the first 25 row results. Dim sDomainName As String Dim sProjectName As String Dim sSql As String Dim sReply As String On Error GoTo err sDomainName = "MyDomain" sProjectName = "MyProject" sSql = "SELECT * FROM REQ" sReply = m_SAClient.RunQuery _ (sDomainName, sProjectName, sSql, 25, 0) MsgBox sReply Exit Sub err: MsgBox "Program failed:" + err.Description End Sub