ServersDeveloping from Chaos Page 8

Developing from Chaos Page 8




T.Mallard

Using ASP to Create a Website from Spreadsheets Continued

Finished with the product pages, but the catalog needs a heirarchy, so some asp pages were created to arrange several levels of indexes and also the pricing pages within the navigation schema. These are by product and group types. Then, the homepage was coded to be created from database sources to create drop-down select boxes by product or group. Since these two groupings rely on the same logic, slightly altered, here’s the one for the index of product types.

“)
rsInput.movenext
else
‘finish the page
output.writeline(“


set conn2 = server.createobject(“Scripting.FileSystemObject“)
htmlOut = “X:websharewwwrootgnsv1type_price_00& series &.html
set output = conn2.OpenTextFile(htmlOut, 8, True)

    …typical html header and navigation response.write’s go here…

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.open product“, conn1, 2, 3, 2
ptype = rsInput(“prod_type“)
tfooter = “
Dynamic Content Resources by
Mallard Design Company ©1999


To Top of Page


while not rsInput.EOF
series = series + 1
if (rsInput(“prod_type“) = ptype) or (series 2) then
lines = lines + 1
output.writeline(“

& lcase(rsInput(“prod_type“)) & & rsInput(“prod_page“) &“” target=_top>& rsInput(“prod_model“) & & rsInput(“part_number“) & >& rsInput(“description“) & $” & formatnumber(rsInput(“sin132_price“), 0, –2) &

“)
output.writeline(“Notes:
“)
set conn1 = server.createobject(“ADODB.Connection“)
conn1.openProvider=Microsoft.Jet.OLEDB.3.51; Data Source=X:websharewwwrootgnscgigns_01.mdb
set rsTemp3 = server.createobject(“ADODB.Recordset“)
rsTemp3.opennotes“, conn1, 2, 3, 2
while not rsTemp3.EOF
if not (rsTemp3(“prod_type“) = ptype) then
  if done = 0 then
    done = 1
  if not isnull(rsTemp3(“note1“)) then
    output.writeline(“” & rsTemp3(“note1“) & “
“)
    end if
    if not isnull(rsTemp3(“note2“)) then
      output.writeline(“” & rsTemp3(“note2“) & “
“)
    end if
    if not isnull(rsTemp3(“note3“)) then
      output.writeline(“” & rsTemp3(“note3“) & “
“)
    end if
  end if
end if
rsTemp3.movenext
wend

Latest Posts

Related Stories