SLEEP Function

navuser1
Member Posts: 1,334
Hi All,
I'm working in Nav 4.0 Sp3.
And I want to see the (best) use of SLEEP function
in my base DB(Cronus).
Thnx & regards.
I'm working in Nav 4.0 Sp3.
And I want to see the (best) use of SLEEP function
in my base DB(Cronus).
Thnx & regards.
Now or Never
0
Comments
-
From Online Help.SLEEP
Use this function to return control to the operating system for a specifiable amount of time.
SLEEP(Duration)
Duration
Data type: integer
The number of milliseconds to return control to the operating system for.
Comments
When using SLEEP, control is guaranteed to return to the operating system for at least Duration milliseconds (implying that the period may be longer, depending on what the operating system is doing at the time when control is to return to the caller.)
For example: You execute a batch during the NAS. And in this batch you block the, for example, Customer Table.
So with sleep, for example every 100 Recs, you give other processed the chance to handle the customer (blocked) table.
RegardsDo you make it right, it works too!0 -
Thnx garak.
anything more ??Now or Never0 -
No, I use only the sleep as garak described. To let others to do something.0
-
I use it in the following scenarios:
A) The user uploads a file that on-the-fly creates sales orders and posts them. Since posting will block tables Value Entry, G/L Entry, Item Ledger Entry etc I use the SLEEP function in order to allow the rest of the users to post their orders without being locked for the time needed to post some thousands of orders coming from the file...I generate six different reports printed through a generic text printer to a file all at the same time. I use this function to give the OS some time to rename the first produced file before trying to overwrite it...
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