Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.
If Not Page.IsPostBack Then Dim DBConn As New SqlConnection(ConfigurationManager.ConnectionStrings("CSPConnectionString1").ConnectionString) Dim DBCmd As New SqlCommand Dim DBCmd2 As New SqlCommand Dim DBCmd3 As New SqlCommand Dim DBCmd4 As New SqlCommand DBConn.Open() Try DBCmd = New SqlCommand("SELECT COUNT(keyApplicantID) FROM[Applicants]", DBConn) DBCmd2 = New SqlCommand("SELECT COUNT(keyApplicantID) FROM[Applicants] WHERE (Center = 'North')", DBConn) DBCmd3 = New SqlCommand("SELECT COUNT(keyApplicantID) FROM[Applicants] WHERE (Center = 'Central')", DBConn) DBCmd4 = New SqlCommand("SELECT COUNT(keyApplicantID) FROM[Applicants] WHERE (Center = 'South')", DBConn) Dim varCount As Integer = DBCmd.ExecuteScalar() Dim varCount2 As Integer = DBCmd2.ExecuteScalar() Dim varCount3 As Integer = DBCmd3.ExecuteScalar() Dim varCount4 As Integer = DBCmd4.ExecuteScalar() lblCounts.Text = " Participants: " & varCount.ToString & ", " & " North: " & varCount2.ToString & ", " & " Central: " & varCount3.ToString & ", " & " South: " & varCount4.ToString Catch exp As Exception Response.Write(exp) End Try DBCmd.Dispose() DBConn.Close() DBConn = Nothing End If
|Help Parsing a String with SQL Syntax||23||28|
|How can my static class become undefined??||8||0|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!