Developing from Chaos Page 5

Download the authoritative guide: Data Center Guide: Optimizing Your Data Center Strategy

Download the authoritative guide: Cloud Computing: Using the Cloud for Competitive Advantage


Using ASP to Create a Website from Spreadsheets Continued

set conn4 = server.createobject("ADODB.Connection")
conn4.open "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=x:\webshare\wwwroot\gns\cgi\gns_01.mdb"
set rsTemp = server.createobject("ADODB.Recordset")
rsTemp.open "product", conn4, 2, 3, 2
while not rsTemp.EOF
  if not rsInput("part_number") = rsTemp("part_number") then
  output.writeline("<a href=""" & rsTemp("prod_price_page") & """><font size=2 color=800000 face=""Arial,Helvetica,Verdana"">" & rsInput("prod_title") & " pricing</font></a><p>")
  end if
set rsTemp = nothing
output.writeline(rsInput("prod_content") & "<hr>")
output.writeline("<br><font size=2 color=000000 face=""Arial,Helvetica,Verdana"">Notes:</font><br>")
set rsTemp2 = server.createobject("ADODB.Recordset")
rsTemp2.open "notes", conn1, 2, 3, 2
while not rsTemp2.EOF
  if rsInput("prod_type") = rsTemp2("prod_type") then
    if not isnull(rsTemp2("note1")) then
    output.writeline("<font size=1 color=000000 face=""Arial,Helvetica,Verdana"">" & rsTemp2("note1") & "</font><br>")
    end if
  if not isnull(rsTemp2("note2")) then
    output.writeline("<font size=1 color=000000 face=""Arial,Helvetica,Verdana"">" & rsTemp2("note2") & "</font><br>")
    end if
  if not isnull(rsTemp2("note3")) then
    output.writeline("<font size=1 color=000000 face=""Arial,Helvetica,Verdana"">" & rsTemp2("note3") & "</font><br>")
    end if
  end if
set rsTemp2 = nothing
output.writeline("<p>" & rsInput("prod_footer"))
output.writeline("<hr><br><a href=""#page_top"">To Top of Page</a>")
response.write("done: " & lines & "<br>")
response.write("error: " & lines)
end if

Now for the fun part, first, parse through the html to select out the keywords...this is a kludgy, but effective, method of listing words to omit from the keyword list since the catalog uses a limited vocabulary in it's content. This section is being run within the product page while loop, so those values are resolved for vnum, and a new table is created for each of these, then fills it with results of the parsing filter. The table is then finally used to insert the keywords into the product pages. This is done as a version so the auto-numbering of filenames allows automating this step.

This article was originally published on Mar 28, 1999

Thanks for your registration, follow us on our social networks to keep up-to-date