Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.
Protected Sub CountApplications() Dim DBConn As New SqlConnection(ConfigurationManager.ConnectionStrings("JobfairsConnectionString1").ConnectionString) Dim DBCmd As New SqlCommand DBConn.Open() Try DBCmd = New SqlCommand("IF (SELECT COUNT(ApplicantID) FROM Applicants ) > 60 SELECT -1 as error FROM Applicants", DBConn) ' ELSE BEGIN INSERT INTO Applicants (householdIncomeID) VALUES (@ddlHouseholdIncome); Select SCOPE_IDENTITY() End", DBConn) Dim priKey As Integer = DBCmd.ExecuteScalar() If priKey < 0 Then Session("EventTime") = "10/6/2010 12:45:00 AM" Else Session("EventTime") = "10/6/2010 9:45:00 AM" End If Catch exp As Exception Response.Write(exp.Message) End Try 'Close Database connection DBCmd.Dispose() DBConn.Close() DBConn = Nothing End Sub
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!