The Code below results in an exception: "Object reference not set to an instance of an object." in the line<BR>arrCategories = strCategories.Split(",")<BR><BR>What&#039;s wrong?<BR><BR><BR> Dim DbConnect As New DataAccess.objDataAccess()<BR> Dim DsCategories As New DataSet()<BR> DsCategories = DbConnect.RunSPReturnDS("Select_Categories", "Categories", New SqlParameter("@CategoryId", -1))<BR> Dim intRecordCount As Integer<BR> Dim intLoop As Integer<BR> Dim intCurItem = 0<BR> Dim intIndent As Integer<BR> Dim strIndent As String<BR> Dim strCategories As String<BR> intRecordCount = DsCategories.Tables(0).Rows.Count<BR> For intLoop = 0 To intRecordCount - 1<BR> If CInt(DsCategories.Tables(0).Rows(intLoop)("ParentC ategoryId")) = CInt(intCurrentId) Then<BR> For intIndent = 1 To IntDepth<BR> strIndent = strIndent & "&nbsp;&nbsp;"<BR> Next<BR> strCategories = strCategories & (DsCategories.Tables(0).Rows(intLoop)("CategoryId" )) & "," & strIndent & DsCategories.Tables(0).Rows(intLoop)("Description" ) & ","<BR> strCategories = strCategories & GetCategories(CInt(DsCategories.Tables(0).Rows(int Loop)("CategoryId")), IntDepth + 1)<BR> End If<BR> Next<BR> Dim arrCategories() As String<BR> arrCategories = strCategories.Split(",")