%@ LANGUAGE="VBScript" %> <% start_time = Time %> <% Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If Request("rows")="" Then irows=100 Else irows=CLng(Request("rows")) End If SQLStmt = "select count(logdate) totnum from sitester.sensor_log" Set RS_max = Connection.Execute(SQLStmt) itot=CLng(RS_max("totnum")) If irows>itot Then irows=itot End If SQLStmt = "select * from sitester.sensor_log where rownum<=" & Cstr(irows) & " order by logdate desc" Set RS = Connection.Execute(SQLStmt) %>