Apr 1, 2005 #1 mike55 Well-known member Joined Mar 26, 2004 Messages 726 Location Ireland Is it possible to search a dataset for a particular table, and if you find that table to remove it? Mike55
Is it possible to search a dataset for a particular table, and if you find that table to remove it? Mike55
Apr 1, 2005 #2 mike55 Well-known member Joined Mar 26, 2004 Messages 726 Location Ireland Found the answer: Code: If Not (dsDataset.Tables(dtName) Is Nothing) Then dsDataset.Tables.Remove(dtName) End If
Found the answer: Code: If Not (dsDataset.Tables(dtName) Is Nothing) Then dsDataset.Tables.Remove(dtName) End If
Apr 4, 2005 #3 Nerseus Danner Joined Oct 22, 2002 Messages 2,547 Location Arizona, USA User Rank *Expert* In C#, checking if a table is null would cause an exception. You should use the Contains method: Code: If dsDataset.Tables.Contains(dtName) Then dsDataset.Tables.Remove(dtName) End If -ner
In C#, checking if a table is null would cause an exception. You should use the Contains method: Code: If dsDataset.Tables.Contains(dtName) Then dsDataset.Tables.Remove(dtName) End If -ner