convert sql datasource to data table and compute on data table.
Dim dvSql As DataView = DirectCast(SqlDataSourceCustomerInvoice.Select(DataSourceSelectArguments.Empty), DataView)
Dim dt As New DataTable
dt = dvSql.ToTable
Dim amt As Double = dt.Compute("Sum(RentAmt)", "")
Literal1.Text = "Total Amount: " & amt.ToString()
0 Comments:
Post a Comment
Thanks a lot.
Subscribe to Post Comments [Atom]
<< Home