-524 Lock table can only be used within a transaction.
Because this database has a transaction log, a table can only be locked
within a transaction. Review the program, and ensure that a BEGIN WORK
statement is issued to start a transaction before this statement.