Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.NET - Windows form, a timer or pause

Posted on 2010-08-26
6
Medium Priority
?
606 Views
Last Modified: 2012-05-10
Hello experts,

I created a windows application that goes either update/insert to a database.  Once it does this, the database has a few triggers that runs and update a couple of things.  It normally takes about 5 seconds for it to complete.  Is there a way I can pause for like 5 seconds before it continues the next line of code to update/insert another table?
0
Comment
Question by:holemania
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 18

Assisted Solution

by:John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou earned 1000 total points
ID: 33537167
Somehow you need a delay function correct?
Dim StartTime As Date
                StartTime = Now
                While DateDiff("s", StartTime, Now) < 5
                End While
0
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33537181
Before that set your cursor to waitcursor ...then the function i wrote  then your update method...Finally set cursor  default...
0
 
LVL 17

Accepted Solution

by:
Zhaolai earned 1000 total points
ID: 33537234
Use this:

System.Threading.Thread.Sleep(5000)


0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 33537254
0
 
LVL 5

Expert Comment

by:samml
ID: 33548584
Can you tell more about your code? Maybe there is a simpler more elegant solution than using wait commands. (Something with threads, ...)
0
 

Author Closing Comment

by:holemania
ID: 33558029
Thanks that's all I needed.  Just to pause for a few seconds to let the job complete.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question