I had to prove that a developer was handling deadlock timeouts correctly the other day. In order to generate a 'deadlock' The following bit of T/SQL was quite helpful.
Although you could argue that someone at Microsoft should be taken out and shot for making it legal to put a wait inside a transaction boundary like this, it is quite useful in this instance. It updates the record, then waits for a minute before committing it. This locks the row and gives you ample time to run your application to see if it handles DB timeouts correctly.
You could substitute a ROLLBACK for the COMMIT, but I haven't tested this...
Code:
BEGIN TRANSACTION
UPDATE party SET somecolumn = 'something'
WAITFOR DELAY '00:01'
COMMIT
You could substitute a ROLLBACK for the COMMIT, but I haven't tested this...