My question is How to lock a user account in sql server.
I am calling the following stored procedure in my vc code.....

/* Lock user */
IF @p_commit = 'Y' BEGIN
EXEC sp_denylogin @p_operid
END

This is to lock a user account created in sql server but i am getting the following error....

'Work' is not a Valid Window NT name. Give the complete name: <domain\username>. Here 'work' is one of the PI operators with sql server authentication.

The same type of error i am getting when trying to unlock user using EXEC sp_grantlogin...
What should i use in my stored procedure to lock or unlock my sqlserver user...

Here work is one of the sql server users available with me ......

I don't want to restrict the winnt user...i want to restrict only sql server user to login to my application using sqlserver.

Any suggetions are Welcome..........Thanks InAdvance....