再請問一下richard 幫我看一下如何改?程式碼在裡面!謝謝!(編號:7839)

'  db.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("/pcball.mdb")
'  db.open "PCBALL"
db.Open "DSN=**;uid=sa;pwd=;database=**"
  SQLQuery = "SELECT * FROM 大廣告"
  Set rs = db.Execute(SQLQuery)
  do while not rs.EOF
   num=num+1
   rs.MoveNext
  loop       
%>
<script language=vbscript>
 dim v,i,j
 dim ary(<%=num%>)
 
<%rs.MoveFirst%>
<% for i=0 to num-1 %>
    <% IF rs("上檔日期") <= DATE and rs("下檔日期") >= DATE and rs("刊登與否") = "True" THEN %>
      <% j=j+1 %>
     

ary(<%=j%>)="<a href='http://<%=rs("連接網址")%>' target='ttt'><img src='./pictures/<%=rs("圖檔位置")%>' Alt='<%=rs("廠商名稱")%>' width='468' height='60'></a>"
    <% END IF %>
    <%rs.MoveNext%>
<% next %>
 
 sub pp
   v=v mod <%=j%> +1
   nn.innerhtml=ary(v)
 end sub
 
 
 sub window_onLoad
   nTimer=SetInterVal("pp",30000,"Vbscript")
 end sub