G
Guest
I need help. I run the code below to get a single column from a view. This
code will work for a while and then suddenly I get the above message and it
will not work after that. I cut this code and paste it into a new for and it
runs for a while then dies. This is not the first time tis has happened and
I am looking for answers
Function FillDateLookup() As ArrayList
Dim al_Filler As New ArrayList
Dim taAMI As New
Ds_DashboardsTableAdapters.Vw_HQI_AMI_Rate_SiteTableAdapter
Dim DataTable1 As New DataTable
DataTable1 = taAMI.GetDataByDistinctMonth()
Dim dtreader1 As DataTableReader
dtreader1 = DataTable1.CreateDataReader
If dtreader1.HasRows = True Then
Do While dtreader1.Read
al_Filler.Add(New
QDSLists.ListMaker.ListFiller(dtreader1("Discharge_Month").ToString(),
QDS_DateTimeUtil.ChangetoMonthYearText(dtreader1("Discharge_Month")).ToString()))
Loop
Else
al_Filler.Add(New QDSLists.ListMaker.ListFiller("0000-00", "No
Data Avail"))
End If
dtreader1.Close()
taAMI.Dispose()
Return al_Filler
End Function
code will work for a while and then suddenly I get the above message and it
will not work after that. I cut this code and paste it into a new for and it
runs for a while then dies. This is not the first time tis has happened and
I am looking for answers
Function FillDateLookup() As ArrayList
Dim al_Filler As New ArrayList
Dim taAMI As New
Ds_DashboardsTableAdapters.Vw_HQI_AMI_Rate_SiteTableAdapter
Dim DataTable1 As New DataTable
DataTable1 = taAMI.GetDataByDistinctMonth()
Dim dtreader1 As DataTableReader
dtreader1 = DataTable1.CreateDataReader
If dtreader1.HasRows = True Then
Do While dtreader1.Read
al_Filler.Add(New
QDSLists.ListMaker.ListFiller(dtreader1("Discharge_Month").ToString(),
QDS_DateTimeUtil.ChangetoMonthYearText(dtreader1("Discharge_Month")).ToString()))
Loop
Else
al_Filler.Add(New QDSLists.ListMaker.ListFiller("0000-00", "No
Data Avail"))
End If
dtreader1.Close()
taAMI.Dispose()
Return al_Filler
End Function