• I am happy you got to the bottom of it. I try to call these out whenever I can, it's not a knock, just pointing out the preferred syntax for new development. sp_grantdbaccess was deprecated in SQL 2005 and will be removed from a future product so while you're in there consider changing those calls to use CREATE USER instead.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato