Hi all
I've got a dataset (populated from an XML) and I searching one of its tables using LINQ... here's what I'm doing...
As you can see, I am searching for a string with a value of 'strSearchString'... what's happening is that I run this code several times and it seems that each successive load into the 'MatchMakerXML_DataTable' is being appended... is that what I am doing? I say this because the match count on my query seems to increment by one each pass...
I'm able to eliminate this by placing 'MatchMaker_DataTable = Nothing' before the DataSet.load command...
Thanks!
I've got a dataset (populated from an XML) and I searching one of its tables using LINQ... here's what I'm doing...
VB.NET:
MatchMakerXML_DataTable = MatchMakerXML_Dataset.Tables("COMPONENT_MATCH")
'Identify Database Component Table field (as per MatchMaker XML)
Dim MatchMakerXML_Query = From Match In MatchMakerXML_DataTable.AsEnumerable() Select Match _
Where (Match.Field(Of String)("AUTOCAD") = strSearchString)
For Each Match In MatchMakerXML_Query
strAutoCAD_Block_Attribute_Database = Match.Field(Of String)("DATABASE")
Next
As you can see, I am searching for a string with a value of 'strSearchString'... what's happening is that I run this code several times and it seems that each successive load into the 'MatchMakerXML_DataTable' is being appended... is that what I am doing? I say this because the match count on my query seems to increment by one each pass...
I'm able to eliminate this by placing 'MatchMaker_DataTable = Nothing' before the DataSet.load command...
Thanks!