52
1
Imports System
2
Imports System.Xml
3
Imports System.Data
4
5
Public Module Module1
6
Public Sub Main()
7
' Get a DataTable instance from helper function.
8
Dim table As DataTable = GetTable()
9
10
' Console.WriteLine("Table rows = " & table.Rows.Count)
11
12
' For Each row As DataRow In table.Rows
13
' ' Write value of first Integer.
14
' Console.WriteLine(row(0))
15
' Next
16
17
Dim sql As String = "Dosage > 0"
18
Dim rows() As DataRow = table.Select(sql)
19
20
For Each row As DataRow In rows
21
' Convert and write first value
22
row(0) = Convert.ToInt32(row(0))
23
Console.WriteLine(row(0))
24
Next
Cached Result