G
Guest
I have create a dataset that contains only the data that I want. Now I want to display the data a field at a time. How do I retreive the data in order to display it? I have included a code sample below:
Private Sub GetDataByEventType(ByVal AlertType)
Dim AlertTypeData As DataTable = AlertDS.Tables("AlertDetail")
' Check for Alert Type of Speeding as an EventType.
Dim AlertExpression As String
' Dim EventType as String =
'Dim TypeOFAlert As String = AlertType
AlertExpression = "EventType = 'Speeding' and Speed > EventDataLow"
Dim AlertsFound() As DataRow
' Use the Select method to find all rows matching the filter.
AlertsFound = AlertTypeData.Select(AlertExpression)
Dim Alert As Integer
' Send Message to Screen of each returned row.
For Alert = 0 To AlertsFound.GetUpperBound(0)
Console.WriteLine(AlertsFound(Alert)(0))
' MsgBox("Min Number: " & Min_Num & "is Speeding" & "Speed is: " & Speed)
Next Alert
End Sub
Private Sub GetDataByEventType(ByVal AlertType)
Dim AlertTypeData As DataTable = AlertDS.Tables("AlertDetail")
' Check for Alert Type of Speeding as an EventType.
Dim AlertExpression As String
' Dim EventType as String =
'Dim TypeOFAlert As String = AlertType
AlertExpression = "EventType = 'Speeding' and Speed > EventDataLow"
Dim AlertsFound() As DataRow
' Use the Select method to find all rows matching the filter.
AlertsFound = AlertTypeData.Select(AlertExpression)
Dim Alert As Integer
' Send Message to Screen of each returned row.
For Alert = 0 To AlertsFound.GetUpperBound(0)
Console.WriteLine(AlertsFound(Alert)(0))
' MsgBox("Min Number: " & Min_Num & "is Speeding" & "Speed is: " & Speed)
Next Alert
End Sub