What is the best way for me to have several datasets ?
i've thought about creating a routine for creating datasets with a number in their names, each one with the desired data, but that's not very intelligent (although might work)
i'd like to create what would be like an "ARRAY OF DATASETS"
vb:
<whatever> = ds(1).<whatever>
<whatever> = ds(2).<whatever>
...
...
and beign able to see how many datasets i have in this "array" would be desirable.
any answer in c# or vb.net is welcome! (although i'm developing in vb.net)
i've tried doing it like an array
Dim dinfo As DirectoryInfo = New DirectoryInfo("c:\")
Dim finfo As FileInfo() = dinfo.GetFiles("*.xml")
Dim ds() As DataSet = Nothing
For a = 0 To finfo.GetLength(0) Step 1
ds(a).ReadXml("c:\" + finfo(a).Name)
Next
and i get
***Object reference not set to an instance of an object.***
so i assume it just isn't like this.
(obs, i've done the same code loading one XML to one dataset and it works perfectly, i've gone back and forth more than one time to assure that it isn't just a logical mistake, it's syntax and lack of programming knowlegde.. haha)
Thank you!