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

'DOEvents'

Status
Not open for further replies.

BiggerD

Programmer
Jun 19, 2002
43
GB
Does anybody know if there is such a command in SQL that is similar to DOEvents in VB ??
 
Take a look at the WAITFOR command:
WAITFOR {DELAY 'time' | TIME 'time'}
where
DELAY
Instructs SQL Server to wait until the specified amount of time has passed, up to a maximum of 24 hours.
TIME
Instructs SQL Server to wait until the specified time.
time
Specifies a time in one of the acceptable formats for datetime data. The time you specify can include hours, minutes, and seconds. Use the format 'hh:mm:ss'. You cannot specify dates - the date portion of the datetime value is not allowed. You can also specify a local variable in place of the 'time' string. For details, see the Datatypes topic.

Remarks
After executing the WAITFOR statement, you cannot use your connection to SQL Server until the time or event that you specified occurs.
To see the active and waiting processes, use the sp_who system stored procedure.
 
Take a look at the WAITFOR command:
WAITFOR {DELAY 'time' | TIME 'time'}
where
DELAY
Instructs SQL Server to wait until the specified amount of time has passed, up to a maximum of 24 hours.
TIME
Instructs SQL Server to wait until the specified time.
time
Specifies a time in one of the acceptable formats for datetime data. The time you specify can include hours, minutes, and seconds. Use the format 'hh:mm:ss'. You cannot specify dates - the date portion of the datetime value is not allowed. You can also specify a local variable in place of the 'time' string. For details, see the Datatypes topic.

Remarks
After executing the WAITFOR statement, you cannot use your connection to SQL Server until the time or event that you specified occurs.
To see the active and waiting processes, use the sp_who system stored procedure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top