I have a two Datasets called DSMonitors and DSPings. Inside DSMonitors I have a data table called DTMonitors. Inside DSPings I have a data table called PingTable.
The idea is to combine the two data tables so I can display it in a DataGridView.
First, I load the data from the XML files.
When debugging, if I were to look at the columns property of DSMonitors it doesn't have the Columns of DSPings. So I'm under the impression that the tables need to match up and then Merge is just for the data itself. Both DataTables share a unique column. I see plenty of examples when it comes to SQL Query but I'm loading my data from XML files. What's the proper way to go about this? Any assistance?
DTMonitors - Monitor_ID - Device_Name - Monitor_Protocol |
PingTable - Monitor_ID - Result - Timestamp - Count |
The idea is to combine the two data tables so I can display it in a DataGridView.
First, I load the data from the XML files.
Code:
If My.Computer.FileSystem.FileExists(FRMMain.xmlMonitorsFile) Then
DSMonitors.ReadXml(FRMMain.xmlMonitorsFile)
End If
If My.Computer.FileSystem.FileExists(FRMMain.xmlPingFailFile) Then
DSPings.ReadXml(FRMMain.xmlPingFailFile)
End If
DSMonitors.Merge(DSPings)