Devo lanciare uno script per aggiornare una tabella di un db MySQL composta da 200.000 record.
Come posso spezzare lo script in modo che mi faccia 1.000 aggiornamenti alla volta e non tutti insieme, per evitare questo errore?
Active Server Pages error 'ASP 0113'
Script timed out
/aggiornamento.asp
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
Questo è lo script.
codice:sql = "SELECT * FROM iscrizionemd5 ORDER BY id ASC" SET RS = Conn1.Execute(sql) Do While Not RS.EOF IF len(RS("password")) <> 0 and IsNull(RS("salt")) Then GUIDMD5 = Server.CreateObject("Scriptlet.Typelib").GUID minuscolo = lcase(GUIDMD5) destra = Right(minuscolo,39) salt = left(destra, 36) password = RS("password") iddonna = RS("iddonna") passwordMD5 = md5(password & salt & username) sqlresetpassword = "UPDATE iscrizionemd5 SET password='" & passwordMD5 & "', salt='" & salt & "' WHERE id=" & id Conn1.Execute(sqlresetpassword) End If RS.Movenext Loop RS.Close Conn1.Close Set RS = Nothing Set Conn1 = Nothing