473,324 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Adding a 10 second delay

All,
I am using a while loop like so

bool bProcess = true;
while (bProcess)
{
//Do some processing
//update to Database
if (tablelocked)
{
wait 10 seconds try again;
break;
}
else
{
commit;
bProcess = false;
}
}

How do i set a timer for 10 seconds before resuming the while loop.

AAny help is appreciated
Jawahar

Nov 16 '05 #1
1 10700
In transactional database terms, 10 seconds is absolutely AGES.
Try waiting for about 0.1 seconds, maybe?
But System.Threading.Thread.Sleep(time) is the call to do it.
"Jawahar" <Ja*****@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
All,
I am using a while loop like so

bool bProcess = true;
while (bProcess)
{
//Do some processing
//update to Database
if (tablelocked)
{
wait 10 seconds try again;
break;
}
else
{
commit;
bProcess = false;
}
}

How do i set a timer for 10 seconds before resuming the while loop.

AAny help is appreciated
Jawahar

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Harlin Seritt | last post by:
I am working on making something called a PopMsg widget which is actually identical to a Balloon widget from Pmw. Here is the code: ---code--- from Tkinter import * import time class PopMsg:...
10
by: Eric Petruzzelli | last post by:
If I fill my dataset and there is no data. The dataset is still created with zero rows (all columns are there). When I add my first row using the script below, it takes over 2 seconds to add??? If...
0
by: Martyn | last post by:
I just need to insert a delay of, for example, 3 seconds, in my code. For example a loop, loops three times. I want to add a delay of three seconds, so each loop takes three seconds to...
0
by: eljainc | last post by:
Hello, I am *very* new to VS 2005 Standard and am learning on using the VS IDE. I have noticed that when i right click on the toolbox and select 'Choose items' there is a very long delay (5-10...
0
by: Wayne | last post by:
Original Post: The following problem started on my PC about a week ago and I can't link it to any specific change. I'm using Access XP. If I have any database open and try to open any other...
2
by: Dave Calkins | last post by:
I'm wriiting an MFC C++ application which uses a third party C# .NET API via a DLL. The app runs fine. If I add a new, empty C++ class, and compile/link it refuses to run, complaining about not...
0
by: Jonathan Mark | last post by:
hi all... I wrote a seemingly simple function (below) to use Popen3() and select() to run a program and capture its exit status, stdout output, and stderr output. It worked fine until the box...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I make a 10 second delay? ----------------------------------------------------------------------- There...
23
by: cmdolcet69 | last post by:
How can i add a 5ms delay between bytes i send over to a controller? I have to send 6 bytes in total however in between each byte i need to have a 5ms delay.
5
by: danfan46 | last post by:
Hi! I have a previous post on the subject that connect takes a long time. I uninstalled db2 completely. Installed V9.5 Installed fixpack 1 created das created an instance installed...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.