def add_category(conn, category_name, category_type_id):
    if (is_conn(conn) and is_str(category_name) and is_int(category_type_id)):
        cursor = conn.cursor()
        cursor.execute('SET IDENTITY_INSERT dbo.Categories ON')
        conn.commit()
        cursor.execute('INSERT INTO dbo.Categories (Id, CategoryName,CategoryType)             VALUES((SELECT max(Id)+1 FROM dbo.Categories),?,?)', (category_name, category_type_id))
        conn.commit()
        cursor.execute('SET IDENTITY_INSERT dbo.Categories OFF')
        conn.commit()
        return True
    else:
        raise AttributeError('Connection object or Category Name or Category Type ID                 was not provided')
def add_category(conn, category_name, category_type_id):
    if (is_conn(conn) and is_str(category_name) and is_int(category_type_id)):
        cursor = conn.cursor()
        cursor.execute('SET IDENTITY_INSERT dbo.Categories ON')
        conn.commit()
        cursor.execute('INSERT INTO dbo.Categories (Id, CategoryName,CategoryType)             VALUES((SELECT max(Id)+1 FROM dbo.Categories),?,?)', (category_name, category_type_id))
        conn.commit()
        cursor.execute('SET IDENTITY_INSERT dbo.Categories OFF')
        conn.commit()
        return True
    else:
        raise AttributeError('Connection object or Category Name or Category Type ID                 was not provided')