D
Dave Powlin
This code should work, but does not:
' create data relationship
Dim parentCol() As DataColumn
Dim childCol() As DataColumn
Dim dr As DataRelation
' I get an error message that Object Ref is not set
' the MSDN sample does it this way
'
parentCol(0) = ds.Tables(0).Columns("time_period_id")
parentCol(1) = ds.Tables(0).Columns("irx_network_desc")
childCol(0) = ds.Tables(1).Columns("time_period_id")
childCol(1) = ds.Tables(1).Columns("irx_network_desc")
' so I tried this and got the same message
'
' parentCol(0) = New
DataColumn(ds.Tables(0).Columns("time_period_id").ToString
' parentCol(1) = New
DataColumn(ds.Tables(0).Columns("irx_network_desc").ToString)
' childCol(0) = New
DataColumn(ds.Tables(1).Columns("time_period_id").ToString)
' childCol(1) = New
DataColumn(ds.Tables(1).Columns("irx_network_desc").ToString)
---------------------
What could I possibly be missing? The DataColumn array are not
instantiating.
Any ideas?
DP
' create data relationship
Dim parentCol() As DataColumn
Dim childCol() As DataColumn
Dim dr As DataRelation
' I get an error message that Object Ref is not set
' the MSDN sample does it this way
'
parentCol(0) = ds.Tables(0).Columns("time_period_id")
parentCol(1) = ds.Tables(0).Columns("irx_network_desc")
childCol(0) = ds.Tables(1).Columns("time_period_id")
childCol(1) = ds.Tables(1).Columns("irx_network_desc")
' so I tried this and got the same message
'
' parentCol(0) = New
DataColumn(ds.Tables(0).Columns("time_period_id").ToString
' parentCol(1) = New
DataColumn(ds.Tables(0).Columns("irx_network_desc").ToString)
' childCol(0) = New
DataColumn(ds.Tables(1).Columns("time_period_id").ToString)
' childCol(1) = New
DataColumn(ds.Tables(1).Columns("irx_network_desc").ToString)
---------------------
What could I possibly be missing? The DataColumn array are not
instantiating.
Any ideas?
DP