Locking Problem

myanilkumar
Member Posts: 108
Hi,
I had designed one customized table & form. Users will key in some transactions and posts from that form. when they posts it moves to history table and also during posting we are scanning all the records for recalculate some fields and update. Simultaneousoly 4-5 users craetes the transactions at time. Sometimes if they post the transaction i am getting the locking problem like "Another user has modified the record" and they whole data they key in will lost.
I am using Navision SP3 with SQL Server 2005.
Please tell me how to avoid this problem. Can i want to change Lock time out or any other things?
Please let me know on this.
Thank u,
Anil
I had designed one customized table & form. Users will key in some transactions and posts from that form. when they posts it moves to history table and also during posting we are scanning all the records for recalculate some fields and update. Simultaneousoly 4-5 users craetes the transactions at time. Sometimes if they post the transaction i am getting the locking problem like "Another user has modified the record" and they whole data they key in will lost.
I am using Navision SP3 with SQL Server 2005.
Please tell me how to avoid this problem. Can i want to change Lock time out or any other things?
Please let me know on this.
Thank u,
Anil
0
Comments
-
This sounds that you have to do a LOCKTABLE at the beginning of your transaction, then read the data and then change it. Only after that you should do a COMMIT.
BUT BE CAREFUL! Using a LOCKTABLE and scanning the whole table will lock ALL records until you COMMIT the data. This means that the other users will be blocked until the end of the transaction.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Your error is in doing keyhandling or retreiving other records. For Example take a look at the salesheader/Saleslines. 100 Person in a company can enter entrys allways w/o interference. (as long als every users use an own Header) Every Header, and every single Line to every header is a own record, and Navision cheks only modifications of the single record (the timestamp) before storing in the database.
so you have to research the record which makes the errors or the structure of your Table. The Primary Key(s) should make it able to work with N users in N different primary Keys.
Maybe it's the Numbers-table, or it is a central controll-table for all users, or they all insert records in a unfiltered table?0 -
I had filtered by user ID during insertion of records.
But during refresing of the data there is no filters. we will scan all the records in the table. Is there any solution to avoid this problem?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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