I need to add rows to an existing (maybe) datatable in a dataset that combines the IIS6 index search with my own sql table. I keep getting object reference errors. Anybody help me out? Much thanks.
Code:
If ds.Tables("list").Rows.Count > 0 Then
For Each k As Data.DataRow In ds.Tables("list").Rows
Dim myDate As String
If Convert.ToInt32(k.Item("structure")) = 4 Then
myDate = "Online - " & k.Item("eTitle").ToString
Else
myDate = k.Item("mDate").ToString & " - " & k.Item("eTitle").ToString
End If
Dim objRow As System.Data.DataRow = ds.Tables("listSearch").NewRow
objRow("filename") = "Some Class"
objRow("characterization") = myDate
objRow("rank") = "1100"
objRow("path") = "SomePath.apsx?eid=22"
ds.Tables("listSearch").Rows.Add(objRow)
Next
End If