Create Procedure TotalCount_Sp
As
Begin
SELECT((Select ISNULL(SUM(Tbl_StartupBanner.Price),0) FROM Tbl_StartupBanner) +
(Select ISNULL(SUM(Tbl_SignInBanner.Price),0) FROM Tbl_SignInBanner)+
(Select ISNULL(SUM(Tbl_SignOutBanner.Price),0) FROM Tbl_SignOutBanner)+
(Select ISNULL(SUM(Tbl_HeaderBanner.Price),0) FROM Tbl_HeaderBanner)+
(Select ISNULL(SUM(Tbl_FooterBanner.Price),0) FROM Tbl_FooterBanner)+
(Select ISNULL(SUM(Tbl_WebSpreadBanner.Price),0) FROM Tbl_WebSpreadBanner)
) as Total
End

Jaganathan BantheswaranPosted Mar 4, 2014, 1:16 AM
You can do something like,
Dim con As New SqlConnection("your connection string here")
con.Open()
Dim com As New SqlCommand("TotalCount_Sp", con)
com.CommandType = CommandType.StoredProcedure
Dim total As Integer = com.ExecuteScalar()
con.Close()
labelMaster.Text = total
Or else,
Read this blog
www.c-sharpcorner.com/Blogs/11462/
Sai Prasad AnumoluPosted Mar 4, 2014, 1:31 AM