ADO.Net - DataRow

Samples

Create an inmemory table, load it with some data (Data is datarows)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
For x = 0 To 200

Dim aRow As DataRow = Table.NewRow

aRow("SellPrice") = Sell
aRow("Total") = Sell * CDbl(txtQuant.Text) - CDbl(txtTransactionCost.Text)

If IsDBNull(arow("executiontype")) Then
' they did not provide an execution type
aRow("Total") += 100
End If

Table.Rows.Add(aRow)

Sell = Sell + 0.25
Next