Correct, however the UDF had a place to specify credentials if needed to the SQL server... Either way, I like this idea and could do this during the login script opposed to the startup script if needed.

I cant get it to update the database even when I execute the script when logged in.

Any ideas where my syntax in the above script is off? The bottom functions are all pulled from the UDF

JD