BBB_SharedFunctions.ConnectToSQLDatabase(SQLDbase)
    # Points to Analyze
    inPointsLayer = arcpy.GetParameterAsText(2)
    # Unique ID for input points
    inLocUniqueID = arcpy.GetParameterAsText(3)
    inLocUniqueID_qualified = inLocUniqueID + "_Input"

    # Day and time window to analyze
    DayOfWeek = arcpy.GetParameterAsText(4)
    # Lower end of time window (HH:MM in 24-hour time)
    start_time = arcpy.GetParameterAsText(5)
    # Default start time is midnight if they leave it blank.
    if start_time == "":
        start_time = "00:00"
    # Convert to seconds
    start_sec = BBB_SharedFunctions.parse_time(start_time + ":00")
    # Upper end of time window (HH:MM in 24-hour time)
    end_time = arcpy.GetParameterAsText(6)
    # Default end time is 11:59pm if they leave it blank.
    if end_time == "":
        end_time = "23:59"
    # Convert to seconds
    end_sec = BBB_SharedFunctions.parse_time(end_time + ":00")

    # OD Cost Matrix stuff
    inNetworkDataset = arcpy.GetParameterAsText(7)
    imp = arcpy.GetParameterAsText(8)
    BufferSize = arcpy.GetParameterAsText(9)
    restrictions = arcpy.GetParameterAsText(10)

    # Will we calculate the max wait time? This slows down the calculation, so leave it optional.
    # Weekday or specific date to analyze.
    # Note: Datetime format check is in tool validation code
    day = arcpy.GetParameterAsText(4)
    if day in BBB_SharedFunctions.days: #Generic weekday
        Specific = False
    else: #Specific date
        Specific = True
        day = datetime.datetime.strptime(day, '%Y%m%d')

    # Lower end of time window (HH:MM in 24-hour time)
    start_time = arcpy.GetParameterAsText(5)
    # Default start time is midnight if they leave it blank.
    if start_time == "":
        start_time = "00:00"
    # Convert to seconds
    start_sec = BBB_SharedFunctions.parse_time(start_time + ":00")
    # Upper end of time window (HH:MM in 24-hour time)
    end_time = arcpy.GetParameterAsText(6)
    # Default end time is 11:59pm if they leave it blank.
    if end_time == "":
        end_time = "23:59"
    # Convert to seconds
    end_sec = BBB_SharedFunctions.parse_time(end_time + ":00")

    # OD Cost Matrix stuff
    inNetworkDataset = arcpy.GetParameterAsText(7)
    imp = arcpy.GetParameterAsText(8)
    BufferSize = arcpy.GetParameterAsText(9)
    restrictions = arcpy.GetParameterAsText(10)

    # Will we calculate the max wait time? This slows down the calculation, so leave it optional.