Navision SQL client not always getting current data
fweeee
Member Posts: 14
Hello all,
I have been looking into a clients problem of data not updating very quickly, and I am wondering if anyone has anything to add on this.
Basically, whats happening, is that when one user updates a field (the example given is the blocked field on the Customer Card), Another user cannot see this update for some time - anywhere from 10 seconds to several minutes.
I have done some testing with this, and found it to be universal (as in, different tables/fields, and different versions of Navision). Also, the problem seems to be with the reading of data from the SQL DB, not the writing of data to the SQL DB, as Querey Analyser is able to see the updated data instantaniously.
A quick description of my testing methodology:
1) Open up two Navision clients, and open the same SQL Database with them. These will henceforth be called NC1 (Navision Client 1) and NC2 (Navision Client 2).
2) Open up SQL Query Analyzer. Prepare an SQL statement that will return the value of a specific field (say blocked) for a specific record in a specific table (say Customer).
3) In NC1, open up the customer Card. Changed the value of the field (Blocked). Leave the record to ensure that it is updated in the Database (go to the next record, come back).
4) Refresh the Query in Query Analyser - it always reflects the update done in NC1.
5) Go to the same record in NC2. It should be the old value (if you have moved quickly enough).
6) For bonus points, try to change the value of the field (blocked) in NC2. It will complain that another user has changed this record after you retreived it from the database.
I have tested this in a number of places now - using a 3.70 Navision Client running from the clients database server, a 3.70 client on my own SQL server, and a 4.00SP1 on my own SQL server.
I have found that the 3.70 client is consistantly slow to update (5 seconds or more), sometimes the 4.00SP1 is instantaniously updated, mostly it is not.
Talking to my colleagues, some of them have also experienced this, but none of them could offer a soution.
Has anyone else dealt with this? If so, can you offer an explaination/solution?
Thanks.
Shanon.
I have been looking into a clients problem of data not updating very quickly, and I am wondering if anyone has anything to add on this.
Basically, whats happening, is that when one user updates a field (the example given is the blocked field on the Customer Card), Another user cannot see this update for some time - anywhere from 10 seconds to several minutes.
I have done some testing with this, and found it to be universal (as in, different tables/fields, and different versions of Navision). Also, the problem seems to be with the reading of data from the SQL DB, not the writing of data to the SQL DB, as Querey Analyser is able to see the updated data instantaniously.
A quick description of my testing methodology:
1) Open up two Navision clients, and open the same SQL Database with them. These will henceforth be called NC1 (Navision Client 1) and NC2 (Navision Client 2).
2) Open up SQL Query Analyzer. Prepare an SQL statement that will return the value of a specific field (say blocked) for a specific record in a specific table (say Customer).
3) In NC1, open up the customer Card. Changed the value of the field (Blocked). Leave the record to ensure that it is updated in the Database (go to the next record, come back).
4) Refresh the Query in Query Analyser - it always reflects the update done in NC1.
5) Go to the same record in NC2. It should be the old value (if you have moved quickly enough).
6) For bonus points, try to change the value of the field (blocked) in NC2. It will complain that another user has changed this record after you retreived it from the database.
I have tested this in a number of places now - using a 3.70 Navision Client running from the clients database server, a 3.70 client on my own SQL server, and a 4.00SP1 on my own SQL server.
I have found that the 3.70 client is consistantly slow to update (5 seconds or more), sometimes the 4.00SP1 is instantaniously updated, mostly it is not.
Talking to my colleagues, some of them have also experienced this, but none of them could offer a soution.
Has anyone else dealt with this? If so, can you offer an explaination/solution?
Thanks.
Shanon.
0
Comments
-
If it's a form that many people are working on a lot. Give the user a button to refresh the record.
on push trigger of the button add
currform.update(false);
Every client has a cache. That's where the records are kept.0 -
Thanks Rashed,
Your snippet of code works, but I was hoping there was some way of getting Navision to refresh the data automatically.
I wasnt actually aware that Navision kept a cache of data in the client - I knew there was a cache for objects, but not data. (I would have thought that the data would be retreived each time the user accessed it).
Shanon.0 -
you can also use OnTimer trigger, and do an currform.update,
or have the user do it by pressing Ctrl+Alt+F5
However, for performance reasons, the way Navision handles this now is best, in my experience0 -
I wouldn't recomend ontimer because if the user is typing while ontimer triger is run, they will lose all the data they were typing. It's very annoying.0
-
You also can use "SELECTLATESTVERSION" to be shure.
When you use SELECTLATESTVERSION, Navision reads the database, not the cache0 -
I guess you could put SELECTLATESTVERSION on OnAfterGetRecord().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
- 322 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
