as often happens, the solution of "built-in errors" is explained in online help.
activate the debugger without break on triggers and then check your locktable instruction.
Here's an extract of online help for locktable function:
Because all write operations automatically lock the table in use, LOCKTABLE would appear unnecessary. However, you could have a transaction in which an application wants to inspect data and then only possibly change it, with a guarantee that the data being changed has not been modified by other applications since the read operation. The solution is to explicitly lock the table before the read operation. This ensures that no other application makes changes between the read operation and the possible write operation.
The SQL Server Option for Microsoft Dynamics NAV only supports the default values for the parameters of the LOCKTABLE function – LOCKTABLE(TRUE,FALSE). From the point where it takes effect, the LOCKTABLE function causes all operations on the table to be SERIALIZABLE. If [Wait] is set to false, it will be ignored. You must set [VersionCheck] to false otherwise an error will occur.
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
Comments
activate the debugger without break on triggers and then check your locktable instruction.
Here's an extract of online help for locktable function:
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog