<% '计算总条数 'on error resume next '设置关闭开放 if opengb=0 then response.Redirect "gb.asp" end if%> <%if usemaxdata=1 then dim gbtotal sql = "select id from gb" set rs = server.CreateObject ("adodb.recordset") rs.open sql,conn,1,1 gbtotal=rs.recordcount rs.close set rs=nothing if cint(gbtotal)>=cint(maxdata) then%> <%end if end if%>