Get values from Data View

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I created a DataView from a database where each record has 3 fields:
ID, Title and URL.

I need, in my code, to loop through each record of the DataView and get
the value of ID, Title and URL.

How can I do this?

Thanks,

Miguel
 
Here is how you can do it -
dim dv as DataView = <your code to get dataview>
Dim currentRow As DataRowView
dim intCount as integer = dv.Count() - 1
dim intIndex as integer
for intIndex = 0 to intCount
currentRow = dv(intIndex)
ID = currentRow("ID")
Title = currentRow("Title")
URL = currentRow("URL")
Next
 
Back
Top