ASP 101 - Active Server Pages 101
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
Developer
International
Internet Lists
Internet News
Internet Resources
IT
Linux/Open Source
Personal Technology
Small Business
Windows Technology
xSP Resources
Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash
your e-mail address:



 Top ASP 101 Stories Top ASP 101 Stories
VBScript Classes: Part 1 of N
Migrating to ASP.NET
Getting Scripts to Run on a Schedule

QUICK TIP:
Controlling How a Page is Cached
Show All Tips >>


Developing from Chaos
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
rsTemp.movefirst
while not rsTemp.EOF
  if not rsInput("part_number") = rsTemp("part_number") then
  rsTemp.movenext
else
  output.writeline("<a href=""" & rsTemp("prod_price_page") & """><font size=2 color=800000 face=""Arial,Helvetica,Verdana"">" & rsInput("prod_title") & " pricing</font></a><p>")
  rsTemp.movenext
  end if
wend
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
  rsTemp2.movelast
  end if
  rsTemp2.movenext
wend
set rsTemp2 = nothing
output.writeline("<p>" & rsInput("prod_footer"))
output.writeline("<hr><br><a href=""#page_top"">To Top of Page</a>")
output.writeline("</body>")
output.writeline("</html>")
output.close
response.write("done: " & lines & "<br>")
rsInput.movenext
else
response.write("error: " & lines)
rsInput.movenext
end if
wend
%>

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.

NEXT   PREVIOUS   

Stuff

Previous versions of VBScript are CaseSensitive, this is written for the latest version.
Development Test System: Windows98, PentiumII 200MHz 128Mb
Personal Web Server 4.0 (IIS4), SQL7b3, Personal Oracle, Sybase

Author: T.Mallard, Seattle, WA
http://www.mallard-design.com/
Copyright 1999 Thomas Mallard, USA

 


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback


JupiterWeb networks:

internet.comearthweb.comDevx.com graphics.com

Search JupiterWeb:

Jupitermedia Corporation has two divisions: Jupiterimages andJupiterWeb

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers