Locktable in 5.0
sujatharaoo
Member Posts: 57
Hi,
For our client we have developed one customised report with the customer table with the customer amount table indented. The Locktable Function has been used for deleting the record from customer amount table bcoz the calculated values need to be inserted in the Customer amount table. but when the concurrent users are processing the report the "Locktable error" is populating. The same report is working fine in 3.7 version even when the concurrent users are processing the same report.
Suggest me the solution for this issue.
Thanx in Advance
For our client we have developed one customised report with the customer table with the customer amount table indented. The Locktable Function has been used for deleting the record from customer amount table bcoz the calculated values need to be inserted in the Customer amount table. but when the concurrent users are processing the report the "Locktable error" is populating. The same report is working fine in 3.7 version even when the concurrent users are processing the same report.
Suggest me the solution for this issue.
Thanx in Advance
Regards,
Sujatha.N
Sujatha.N
0
Comments
-
what dababase you were using in NAV3.7 - was it native database ?
and what version are you using now in NAV5.0 - is it MS SQL ?
also could you please tell where (in what trigger) you have put your LOCKTABLE statement ?0 -
Hi,
The both 3.7 and 5.0 version are in SQL Database only. The "Customer" and "Customer Amount" tables are used in the report without indentation, but the Locktable function is used in Customer - OnpreDataitem.
Suggest me to resolve this issue.
Thanx in Advance.Regards,
Sujatha.N0 -
all of the following commands DELETE, INSERT, MODIFY, FINDSET(TRUE) automatically put table into Lock (serializable transaction isolation) mode so the only difference you made with LOCKTABLE in Customer.OnPreDataItem is that now you started locking every record that you read instead of locking only the records that you was reading after the first call to DELETE.
in general reports in Navision can work in only one of the two transaction isolation modes - SERIALIZABLE (write mode) or DIRTY READ (read-only mode). Under serializable mode you cannot read the same records simultaniously (if one report reads a record in serializable mode no other report can read that record until first report finishes).
What i can suggest you to do is to remove LOCKTABLE command and then to delay all deletes you want to make until Report - OnPostReport and delete everything you want to delete in that trigger. You can do it by saving into temporary table the records you plan to delete and then iterate through them and delete in Report - OnPostReport0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 329 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions