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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing Time with Wait Window message

Status
Not open for further replies.

mstrcmtr

Programmer
Nov 14, 2007
103
PK
WAIT WINDOW 'Trying to Lock [ Computer No ] Table .... ' NOWAIT

Want to Show Time from 1 to 30 Seconds with the above message e.g.

WAIT WINDOW 'Trying to Lock [ Computer No ] Table .... ' + '1' + 'Seconds ' NOWAIT
WAIT WINDOW 'Trying to Lock [ Computer No ] Table .... ' + '2' + 'Seconds ' NOWAIT
WAIT WINDOW 'Trying to Lock [ Computer No ] Table .... ' + '3' + 'Seconds ' NOWAIT
WAIT WINDOW 'Trying to Lock [ Computer No ] Table .... ' + '4' + 'Seconds ' NOWAIT
.
.
.
WAIT WINDOW 'Trying to Lock [ Computer No ] Table .... ' + '29' + 'Seconds ' NOWAIT
WAIT WINDOW 'Trying to Lock [ Computer No ] Table .... ' + '30' + 'Seconds ' NOWAIT

 
This doesn't directly answer your question, but are you aware that if you have SET STATUS ON, then VFP will automatically display the lock status while the lock attempts are in progress?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
You can't run code, as this lock waiting time happens while executing a lock and isn't letting you do other things like displaying messages while waiting for the lock.

When you do a loop yourself, you can make use of WAIT WINDOW 'X' NOWAIT, but if a single command takes 30 seconds until a timeout that's it, you don't have code running intermittent, perhaps even not a timer event will fire during things lilke long running queries or updates.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top