Hi, <BR> Here is my code in global.asa, but can not work. Could you please tell Why? and How?<BR><BR>Sub Application_onStart<BR> con=server.CreateObject("ADODB.connection")<BR> con.Open "SomeDSN","",""<BR> sql1="SELECT * FROM hitnum where id=" & 1 <BR> set rs1=con.Execute(sql1)<BR> if rs1.BOF and rs1.EOF then<BR> Application("counter")=1<BR> else<BR> Application("counter")=rs1("counter")<BR> end if <BR> con.close<BR> set con=nothing <BR>End Sub<BR><BR>sub session_onStart<BR> Application.Lock<BR> Application("counter")=Application("counter")+1<BR > Application.UnLock<BR> count=Application("counter")<BR> set con=server.CreateObject("ADODB.connection")<BR> con.Open "tripDSN","",""<BR> sql2="UPDATE hitnum SET counter=" & count & " where id=" & 1 <BR> set rs2=con.Execute(sql2)<BR> con.close<BR> set con=nothing <BR>end sub<BR>