This is the code I'm using:
Dim mytable1 As DataTable
mytable1 = DAL.GetCombinedPSAResults(TBPID.Text)
Dim dr As New DataTableReader(mytable1)
mytable1.Load(dr)
Dim dv As DataView = mytable1.DefaultView
Dim mytable2 As DataTable
mytable2 = DAL.GetOraclePSAResults(TBPID.Text)
Dim dr2 As New DataTableReader(mytable2)
mytable1.Load(dr2)
Dim dv1 As DataView = mytable1.DefaultView
recordcount = dv1.Count
This will return a datatable with the results of the 2 functions combined. The table has 2 columns, Date and Results. I use the data to create a chart. Unfortunately now I have run into a situation where several of the Date values are the same and that doesn't work well in a chart. So what I need is a way to determine if there are duplicate values in the Date column so i can display the data in a gridview instead of a chart.
If (date column has duplicates) Then
put data in gridview
Else
Use data for chart
Thanks for your help.
Dim mytable1 As DataTable
mytable1 = DAL.GetCombinedPSAResults(TBPID.Text)
Dim dr As New DataTableReader(mytable1)
mytable1.Load(dr)
Dim dv As DataView = mytable1.DefaultView
Dim mytable2 As DataTable
mytable2 = DAL.GetOraclePSAResults(TBPID.Text)
Dim dr2 As New DataTableReader(mytable2)
mytable1.Load(dr2)
Dim dv1 As DataView = mytable1.DefaultView
recordcount = dv1.Count
This will return a datatable with the results of the 2 functions combined. The table has 2 columns, Date and Results. I use the data to create a chart. Unfortunately now I have run into a situation where several of the Date values are the same and that doesn't work well in a chart. So what I need is a way to determine if there are duplicate values in the Date column so i can display the data in a gridview instead of a chart.
If (date column has duplicates) Then
put data in gridview
Else
Use data for chart
Thanks for your help.