I have a small project that is not able to connect to a database so I
have the data necessary for the project to run, saved into an XML file
in the root directory of the project/solution in VB Net. I am able to
load the XML data into a temporary table at runtime but am unable to locate a
way to query the temp table via code. An simple example of a query to
a temp table within a project would be nice.
The Table is set up as follows...
1) AutoID *Key
2) Name as string
3) Filepath as string
4) Count as integer
5) Type as string
The following places the data into a table on the page but I
am looking for a way to query/filter this before hand. I would
like to Oder it by Name (A-Z).
Dim DS As DataSet
DS = New DataSet()
DS.ReadXml(appPath + "\data.xml")
Dim i As Integer
For i = 0 To DS.Tables(0).Rows.Count - 1
Console.WriteLine(DS.Tables(0).Rows(i).Item(1))
Next
DataGrid1.DataSource = DS
I know that they is probably a way to do this using the dataSource
I created. But I would also like a plain example of how to perform
a query via code to "Select * From TableA where Name = 'Mike'"
Thanks for any help.