mathieu_cupryk
asked on
row.ItemArray = myRow.ItemArray not set to an instance of an object.
Object reference not set to an instance of an object.
For Index As Integer = 0 To MaxPeriod - 1
' Get date period
StoredProcName = dbName & ".dbo.usp_GetDatePeriodFro mTo"
cmd = dbManager.GetStoredProcCom mand(Store dProcName)
dbManager.AddInParameter(c md, "@YEARMONTH", DbType.String, DtPeriod)
DtPeriod = IncrementDate(DtPeriod, DateIndex)
' Put the yearmonth, start date ,and end date in a dataset
myDs = dbManager.ExecuteDataSet(c md)
' check myTable first
Dim myRow As DataRow
Dim myTable As DataTable = myDs.Tables(0)
If myTable.Rows.Count >= 1 Then
myRow = myTable.Rows(Index)
End If
Dim row As DataRow = myTable.NewRow()
row.ItemArray = myRow.ItemArray
myTable.Rows.Add(row)
Next
For Index As Integer = 0 To MaxPeriod - 1
' Get date period
StoredProcName = dbName & ".dbo.usp_GetDatePeriodFro
cmd = dbManager.GetStoredProcCom
dbManager.AddInParameter(c
DtPeriod = IncrementDate(DtPeriod, DateIndex)
' Put the yearmonth, start date ,and end date in a dataset
myDs = dbManager.ExecuteDataSet(c
' check myTable first
Dim myRow As DataRow
Dim myTable As DataTable = myDs.Tables(0)
If myTable.Rows.Count >= 1 Then
myRow = myTable.Rows(Index)
End If
Dim row As DataRow = myTable.NewRow()
row.ItemArray = myRow.ItemArray
myTable.Rows.Add(row)
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER