% set conn=server.createobject("adodb.connection") connstr="Provider=Microsoft.jet.oledb.4.0;data source="server.mappath("cou.mdb") //cou是數(shù)據庫名 conn.open connstr if session("visited")>"yes" then application.Lock() conn.execute("update counter set hits=hits+1 where kid=1") //counter是數(shù)據庫里面用于存儲數(shù)據的表名 application.UnLock() session("visited")="yes" end if set rs=conn.execute("select * from kuo where kid=1") if rs.eof and rs.bof then counters=0 else counters=rs("hits") end if rs.close conn.close set rs=nothing set conn=nothing %>
您可能感興趣的文章:
詳解Java多線程編程中CountDownLatch阻塞線程的方法
Java多線程編程之CountDownLatch同步工具使用實例
java線程并發(fā)countdownlatch類使用示例
Java數(shù)據結構及算法實例:快速計算二進制數(shù)中1的個數(shù)(Fast Bit Counting)