SHARE
Facebook X Pinterest WhatsApp

Developing from Chaos Page 3

Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



T.Mallard
Using ASP to Create a Website from Spreadsheets Continued


while not rsInput.EOF
  if isnull(rsInput(“note1“)) then

lines = lines+1
rsInput.moveprevious
addin1 = rsInput(“note1“)
addin2 = rsInput(“note2“)
addin3 = rsInput(“note3“)
rsInput.movenext
rsInput(“note1“) = addin1
rsInput(“note2“) = addin2
rsInput(“note3“) = addin3
rsInput.update
response.write(“.”& vbCrLf)

  end if
  rsInput.movenext
  response.write(“:” & “
“& vbCrLf)
wend
conn1.close
set rsInput = nothing
response.write(“done: ” & lines & vbCrLf)
%>

Next step is the basic product page, which has auto-numbering and link navigation created as a part of the build process. This first section of code just arranges the auto-numbering for this. The next opens a new output file, then opens the tables needed to produce a page between chunks of html. The finished page here is a first pass of many passes before all the keywords are inserted and the page is ready to publish. The database is within the web server’s scope so has read/execute/script permissions set under IIS4, and the folder is shared for protection using the machine account under win98/NT4.


set rsInput = server.createobject(“ADODB.Recordset“)
rsInput.open “content”, conn1, 2, 3, 2
rsInput.movefirst
lines = 1
while not rsInput.EOF
if not isnull(rsInput(“prod_model”)) then
series = series + 1
lines = lines + 1
 if series 100 then
  if series 10 then
   htmlOut = “x:websharewwwrootgnsv1prod_00” & series & “.html“
   sNext = series + 1
   htmlNext = “prod_00” & sNext & “.html“
   if series > 1 then
    sPrev = series – 1
    htmlPrev = “prod_00” & sPrev & “.html“
  end if
 else
   htmlOut = “x:websharewwwrootgnsv1prod_0” & series & “.html“
   sNext = series + 1
   htmlNext = “prod_0” & sNext & “.html“
   sPrev = series – 1
   if sPrev = 9 then
    htmlPrev = “prod_009.html“
  else
   htmlPrev = “prod_0” & sPrev & “.html“
   end if
  end if
 else
  htmlOut = “x:websharewwwrootgnsv1prod_” & series & “.html“
  sNext = series + 1
  htmlNext = “prod_” & sNext & “.html“
  if series = 1 then
   htmlPrev = “prod_001.html“
  else
   sPrev = series – 1
  if sPrev = 99 then
   htmlPrev = “prod_099.html“
  else
   htmlPrev = “prod_” & sPrev & “.html“
  end if
 end if
end if
filename = mid(htmlOut, instr(htmlOut, “prod_“))
response.write(“filename: ” & filename & “
“)

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.