Saturday, 20 October 2018

convert sqldatasource to dataview and loop on data.

        Dim paidamount As Double = 0
        Dim saleamount As Double = 0
        Dim DueAmt As Double = 0


        Dim dvSql As DataView = DirectCast(SqlDataSource1.Select(DataSourceSelectArguments.Empty), DataView)
        For Each drvSql As DataRowView In dvSql
            saleamount += CDbl(drvSql("TotalValue"))
            paidamount += CDbl(drvSql("PaidAmount"))

            DueAmt += CDbl(drvSql("Due"))
        Next

0 Comments:

Post a Comment

Thanks a lot.

Subscribe to Post Comments [Atom]

<< Home