Talk about the time handling of ASP and SQL Server interoperability

zhaozj2021-02-11  189

Author: hanbo you will encounter when programming is too time-triggered events, there timer controls in VB, but no asp, if you want to keep the database to wait for a return result, I think you must know, he Will spend a lot of CPU resources, if you say, and you don't have a better solution, press me: set cnn = server.createObject ("adodb.connection" Waittime = "Waitfor DELAY '00: 00: 01 '"' At the SQL server end delayed 1 second, this is a key SQL2 =" select * from database "begintime = now () quittime = 0 'query database 5 seconds, check every 1st Do While QuitTime <5 'delay processing cnn.execute waittime' calling stored procedure query set = cnn.execute (SQL2) quittime = datediff ("s", begintime, now ()) Loop's opinion, experience, too much Education. Email: hanandbo@263.net01-3-6 01:05:52

转载请注明原文地址:https://www.9cbs.com/read-5870.html

New Post(0)