web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Method: disableLockEscalation

Amir Nazim Profile Picture Amir Nazim 5,994

SrsReportDataProviderPreProcess::disableLockEscalation Method [AX 2012]

I was working on a long duration report and the report was build using RDP class that extends with SrsReportDataProviderPreProcess. It is the normal report with set based inserts/updates in temp tables. I implemented the complete class with all business logic and now when I run the report I got error as below.

An exception occurred in the query metadata execution. The exception is Cannot select a record in XXX Tmp (XXXX).

Cannot select a record for update when the transaction is not started on the user connection attached. You need to begin transaction on the user connection first.

 after some research I came to know that it is lock escalation issues that are exhibited by preprocessing reports tables that are populated using set-based inserts, that means you can not reselect the records from Tmp table for further updates.

In my scenario I have to do some updates and selects also on Tmp tables as the business logic was quite complex. For my case the method server public static void disableLockEscalation(TableId _tableId) helps me allot as it disables the lock and allow me to update and selects the previously inserted records



This was originally posted here.

Comments

*This post is locked for comments