%@ LANGUAGE="VBScript" %> <% Server.ScriptTimeout =500 Dim Run() Dim Sequence() Dim Logid() Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open phdb_rd SQLStmt = " select rn.run,rn.logid from phoffline.run_numbers rn,phoffline.log_entries le " SQLStmt = SQLStmt & " where le.logid=rn.logid and (le.action='START_RUN' or le.action='NEW_RUN_SEQUENCE') " SQLStmt = SQLStmt & " and rn.run<5001 " SQLStmt = SQLStmt & " order by le.log_date,le.logid " ' response.write(SQLStmt) Set RS = Connection.Execute(SQLStmt) %>
This script is totally temporary. This table needs to be filled automatically by DAQ
<% Run_Old=-999999 Nall=-1 Do While Not RS.EoF Nall=Nall+1 ReDim Preserve Run(Nall) ReDim Preserve Sequence(Nall) ReDim Preserve Logid(Nall) Run(Nall)=CLng(RS("run")) Logid(Nall)=CLng(RS("Logid")) If Run(Nall)=Run_Old Then Nseq=Nseq+1 Else NSeq=0 Run_Old=Run(Nall) End If Sequence(Nall)=Nseq RS.MoveNext Loop ' ' Insert data into the table ! ' %>| N | Run | Sequence | Logid | Stat |
| <%= i+1 %> | <%= Run(i) %> | <%= Sequence(i) %> | <%= Logid(i) %> | <%= stat %> |