Seems begineer but i really do not understand what these lines of code saying, since I’m kinda like newbie in datatable and dataview or such stuff!
DS.Tables("ActivityLookup").DefaultView.RowFilter = "[Description] =" & EncodeToText(oClass.moGen.Item("DESCRIPTION"))
If DS.Tables("ActivityLookup").DefaultView.Count = 0 Then
EncodeToText will encoed the text given from DESCRIPTION field in the database and convert it to string. So it is filtering it but only certain description fields, how ever by some strange reasons that second line is not working properly.
The first line is setting a filter on the table called
"ActivityLookup"in aDataSetcalledDS. When setting a filter using theRowFilterproperty on theDefaultView, you’re telling the dataset to filter the contents of theDefaultViewaccording to some criteria. In your case, the filter is saying:I don’t know what that value is 🙂
The second line checks to see if any rows exist in the default view after the filter has been applied. In essence, it’s saying “Are there any rows that have that description?”.
Hope that helps.