Originally posted by ESSCHENK
View Post
Regards,
Ultrajones
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
Sub Main(parm as object)
'
' Get a plug-in reference
'
Dim hspi As Object = hs.plugin("ultracid")
Dim pageSize As Integer = 25
Dim pageCur As Integer = 1
'
' The following are called by reference and are updated based on results
'
Dim pageCount As Integer = 1
Dim recordCount As Integer = 0
Dim strSQL = "SELECT TOP 10 ts,nmbr,name FROM tblCallerLog ORDER BY ts DESC"
Dim dataTable As System.Data.DataTable = hspi.ExecuteSQL(strSQL, recordCount, pageSize, pageCount, pageCur)
Dim summary As String = String.Format("{0} pages, {1} total rows.", pageCount, recordCount)
hs.WriteLog ("UltraCID Debug", summary)
' Iterate contents
For Each dataRow as System.Data.DataRow In dataTable.Rows
' Iterate columns associated with row of data (one caller)
For Each tableCol as System.Data.DataColumn In dataTable.Columns
If Not dataRow.IsNull(tableCol.ColumnName) Then
hs.WriteLog ("UltraCID Debug", tableCol.ColumnName & " -> " & dataRow.Item(tableCol.ColumnName))
Else
hs.WriteLog ("UltraCID Debug", tableCol.ColumnName & " -> EMPTY")
End If
Next
Next
End Sub
Comment