CurrentTable.sort = "产品,日期 desc" Dim cmd As New SQLCommand Dim dt As DataTable cmd.CommandText = "Select Top 10 单价 From {订单} Where 产品 = 'PD01' Order By 日期 Desc" dt = cmd.ExecuteReader()
If dt.datarows.count > 2 output.show("最近第三次的单价是: " & dt.DataRows(2)("单价")) End If