PHP Code:
gtcmd.CommandText = ("SELECT Quantity, UnitPrice, Discount FROM [Order Details]")
(Quantity * UnitPrice)-(Quantity * UnitPrice * Discount)
Then return that value (total) and add each rows value to a grand total, like so:
PHP Code:
Dim gtreader As OleDbDataReader = gtcmd.ExecuteReader
While gtreader.Read
Dim tot As Double
For i As Integer = 0 To gtreader.FieldCount - 1
tot = CDbl(gtreader(i))
tot = tot + tot
Next
gtotalTextbox.Text = tot.ToString
End While
Please help and thanks in advance.