write a stored procedure to check for any matches in the database row

  • i have created a activation page for activating the users account, i need to write a login query to check for activation bit in users db row and only login if user is activated ,if not display an error message

  • Are you looking for something like:

    SELECT is_disabled FROM sys.sql_logins WHERE name = 'username';

    Or,

    SELECT is_disabled FROM sys.server_principals WHERE name = 'username';

    Jeff

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply