Guides ASP Developing for Academic and Business Processes Page 8

ASP Developing for Academic and Business Processes Page 8




T.Mallard

Remember to change the file locations to your system drives and resources. This coding runs fine with SQL/Access/Oracle…


%@ language=’vbscript’ %>

% server.scripttimeout = 240 %>
% buffers = true %>
%
dim input, output, htmlOut, author, editor, pubdate, topic, source, locale, annotate, errs, err2
dim conn1, conn2, conn3, rsInput, txtOut, rsTemp, pagename, metatopics, secstart, minstart
dim metasOut
metasOut = “D:Websharewwwrootaspcsfacsfa_metas.txt”
set conn2 = server.createobject(ADODB.Connection)
  conn2.open “DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:Websharewwwrootaspcsfabiblio_01.mdb”

  if not isobject(conn2)then
    errs2 = “unable to create access object”
    else errs2 = “access object created”
    end if
dim allfields, sql_01, sql_02

  sql_01 = sql_01 & “SELECT * from v3_86_index”
set rsInput = conn2.execute(sql_01)

rsInput.movefirst

  set conn1 = server.createobject(Scripting.FileSystemObject)
  if not isobject(conn1) then
    errs = “unable to create object”
  else errs = “file object created”

    end if
dim paging, aline, series, sNext, sPrev

while not rsInput.EOF
series = series + 1

for paging =1 to 80
if paging = 1 then
  if series 100 then
    if series 10 then

      htmlOut = “D:Websharewwwrootaspcsfacsfa_00” & series & “.html”
      sNext = series + 1
      if sNext = 9 then
        htmlNext = “csfa_010.html”

        else
        htmlNext = “csfa_00” & sNext & “.html”
      end if
    sPrev = series – 1
    htmlPrev = “csfa_00” & sPrev & “.html”

    else
    htmlOut = “D:Websharewwwrootaspcsfacsfa_0” & series & “.html”
    sNext = series + 1
    htmlNext = “csfa_0” & sNext & “.html”

    sPrev = series – 1
    if sPrev = 9 then
      htmlPrev = “csfa_009.html”
      else
      htmlPrev = “csfa_0” & sPrev & “.html”

    end if
    end if
  else
    htmlOut = “D:Websharewwwrootaspcsfacsfa_” & series & “.html”
    sNext = series + 1

    htmlNext = “csfa_” & sNext & “.html”
    if series = 1 then
      htmlPrev = “csfa_001.html”

      else
      sPrev = series – 1
      if sPrev = 99 then
        htmlPrev = “csfa_099.html”
        else
        htmlPrev = “csfa_” & sPrev & “.html”

      end if
    end if
  end if
set output = conn1.opentextfile(htmlOut, 8, True)
output.writeline()
output.writeline()
output.writeline()
output.writeline(General Index – Volume 3, 1986 – Current Research in the Pleistocene)
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline(<!– )
output.writeline(//–>)
output.writeline()
output.writeline()
output.writeline(<!–)
output.writeline(.roll {)
output.writeline(font-family:Arial;)
output.writeline(font-size:14pt;)
output.writeline(text-decoration:none;)
output.writeline(color:black;)
output.writeline(})
output.writeline(//–>)
output.writeline()
output.writeline()
output.writeline()
output.writeline()
output.writeline(Current Research in the Pleistocene
)
output.writeline(Volume 3, 1986
)
output.writeline(General Index
)
output.writeline(Page “ & series &
)
output.writeline(

)
end if

if paging = 41 then

    output.writeline(

)
  else
    if trim(rsInput.Fields(topic)) “” then

      metatopics = metatopics & trim(rsInput.Fields(topic)) &;
    end if
  aline = trim(rsInput.Fields(topic)) & ”  ” & trim(rsInput.Fields(subtopic)) & ”  “

  if trim(rsInput.Fields(pages)) “” then
  aline = aline & & trim(rsInput.Fields(pages)) &

  else
  aline = aline &

  end if
  output.writeline(aline)
  aline = “”
end if
rsInput.movenext
if rsInput.EOF then
  paging = 81
    output.writeline(

)

    output.writeline(

)

    output.writeline(

<a href="%22%20&%20htmlPrev%20&%20%22“>Previous Start

)
    output.writeline(Dynamic Content Resources by
Mallard Design Company
)

    output.writeline()
    output.writeline()
    output.close
end if

next
  set conn3 = server.createobject(Scripting.FileSystemObject)
  if not isobject(conn1) then

    errs = “unable to create object
  else errs = “file object created
    end if
set txtOut = conn3.OpenTextFile(metasOut, 8, True)
txtOut.writeline(metatopics)
txtOut.close
metatopics = “”
if not rsInput.EOF then
output.writeline(

)
if series > 1 then
output.writeline(

)
else
output.writeline(

<a href="%22%20&%20htmlPrev%20&%20%22“>Previous <a href="%22%20&%20htmlNext%20&%20%22“>Next

)
end if
output.writeline(

<a href="%22%20&%20htmlNext%20&%20%22“>Next

)
output.writeline(Dynamic Content Resources by
Mallard Design Company
)
output.writeline(

Latest Posts

Related Stories