ServersDeveloping from Chaos Page 9

Developing from Chaos Page 9

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

Section of a product pricing page.
The result is the table listing on the left has the links to the product pages. Then there are the indexes, and below are the main index/homepage loops to create some drop-down select boxes on the page. From all of these, I hope it’s obvious that these pages were easy to code, taking about the standard business week to finalize working on it between other things. Now, as things change, it takes a half-hour to create and publish the website from scratch. It has better navigation than the historical website, and a better clarity of the relationships between the products by using the database.

 


output.writeline(“ name=””prodtype””>“)
set conn1 = server.createobject(“ADODB.Connection“)
conn1.open “Provider=Microsoft.Jet.OLEDB.3.51; Data Source=X:websharewwwrootgnscgigns_01.mdb
set rsInput = server.createobject(“ADODB.Recordset“)
rsInput.openproduct“, conn1, 2, 3, 2
rsInput.movefirst
ptype = rsInput(“prod_type“)
pmodel = rsInput(“prod_model“)
pgroup = rsInput(“prod_group“)

while not rsInput.EOF
lines = lines + 1
if (lines = 1) then
  output.writeline(“” & rsInput(“prod_type_page“) & ““”>” & lcase(rsInput(“prod_type“)))
  end if
if rsInput(“prod_type“) = ptype then
  ptype = rsInput(“prod_type“)
  pmodel = rsInput(“prod_model“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
else
  output.writeline(“” & rsInput(“prod_type_page“) & ““”>” & lcase(rsInput(“prod_type“)))
  ptype = rsInput(“prod_type“)
  pmodel = rsInput(“prod_model“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
end if
wend

output.writeline(“  “)
output.writeline(““)
rsInput.movefirst
ppage = rsInput(“prod_page“)
pgroup = rsInput(“prod_group“)
lines = 0
output.writeline(“” & rsInput(“prod_group_page“) & ““”>” & lcase(rsInput(“prod_group“)))
response.write(“moved first
“)
while not rsInput.EOF
lines = line + 1
if (rsInput(“prod_group“) = pgroup) then
  response.write(“equals: ” & rsInput(“prod_group“)
& “
“)
  ppage = rsInput(“prod_page“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
else
  output.writeline(“” & rsInput(“prod_page“) & ““”>” & lcase(rsInput(“prod_group“)))
  ppage = rsInput(“prod_page“)
  pgroup = rsInput(“prod_group“)
  rsInput.movenext
end if
wend
output.writeline(“  “)

This flow started with Excel files having text and numeric data mixed which was hand pasted into Access table fields created with wizards to establish a database to build an entire website from, including auto-numbered paging, next-previous buttons, and indexes to the two main divisions of product type. The original html pages were used to create keyword lists for each product page which were then added back into the page. And, the main homepage is also built from the database.

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories