hello i want to catch a locktimeout error.
the problem is that it always returns 0 this means that it is successful

i do the following in sql query analyzer:

DECLARE @ret_code INT
EXECUTE @ret_code = sp_getapplock 'QueueLock', 'Exclusive', 'session','50'
print convert(varchar,@ret_code)

ret_code is always 0 no matter how many application locks i make


i think that this must be a bug and microsoft has written it in msdn .
do you know any workaround ?