Private Sub Form16_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim sqlquery As String = "SELECT SUM(price) AS totalprice FROM expenses"
Dim sqlcommand As New OleDbCommand
With sqlcommand
.CommandText = sqlquery
.Connection = conn
.ExecuteNonQuery()
End With
Label2.Text= 'totalprice that is SUM(price)
End Sub
i want to display sum(price) in label2...how to do this plz help..
sushilsth 0 Light Poster
xerohomicide 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.