%
DataSource = "Fredacious"
Set DataConnection = Server.CreateObject("ADODB.Connection")
DataConnection.Open DataSource
if (IsNumeric(Request.QueryString("Section")) and trim(Request.QueryString("Section")) <> "") then
sectionID = Request.QueryString("Section")
else
sectionID = 1
end if
%>
King Fred Computer Systems -- Car Audio Specials

|
<%
dataString = "SELECT * FROM Titles WHERE TitleID = " & sectionID
Set RS = Server.CreateObject("ADODB.Recordset")
Set RS = DataConnection.Execute (dataString)
if not (RS.EOF) then
%>
<%= RS("DisplayTitle") %> |
<%else %>
Section was not found
<%end if %>
| Description |
Price |
<%
dataString = "SELECT * FROM Products WHERE TitleID = " & sectionID
Set RS = Server.CreateObject("ADODB.Recordset")
Set RS = DataConnection.Execute (dataString)
while not(RS.EOF)
if (isNull(RS("ProductDesc")) or RS("ProductDesc") = "") then
strLinkInfoBegin = ""
strLinkInfoEnd = ""
else
strLinkInfoBegin = ""
strLinkInfoEnd = ""
end if
%>
| <%= strLinkInfoBegin %><%= RS("ProductName")%><%= strLinkInfoEnd %> |
<%= FormatCurrency(RS("ProductPrice"))%> |
<%
RS.MoveNext
wend
%>
|
<%
if (isObject(DataConnection)) then
DataConnection.Close
Set DataConnection = nothing
end if
%>