Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a delay during execution

Status
Not open for further replies.

jcostanz

Programmer
May 24, 2001
36
US
I have a program that setups several tables in MySQL.
when I tell it to create a new table or add a column to a table, I have to follow it with this code:

for (int x = 0; x < 10; x++)
{
;
}

to delay execution of the next command other wise it errors out at runtime, the previous command is still running on the server.

Is there a better way of delaying execution for about 1-3 seconds, then using this loop?

Thanks
Jeff
 
Try:

Code:
System.Threading.Thread.CurrentThread.Sleep(1000);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top