<%@ LANGUAGE="VBSCRIPT" %> <% ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' System : StoreFront v.2.5.1 ' ' Author : LaGarde, Incorporated ' Description: Produces a list of all products contained in the ' products table. ' ' Notes : There are no configurable elements in this file. ' ' ' COPYRIGHT NOTICE ' ' The contents of this file is protected under the United States ' copyright laws as an unpublished work, and is confidential and ' proprietary to LaGarde, Incorporated. Its use or disclosure in ' whole or in part without the expressed written permission of ' LaGarde, Incorporated is expressely prohibited. ' ' (c) Copyright 1998 by LaGarde, Incorporated. All rights reserved. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %> <% Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 '---- LockTypeEnum Values ---- Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adLockBatchOptimistic = 4 Dim DSN_Name DSN_Name = Session("DSN_Name") Set Connection = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.RecordSet") Connection.Open "DSN="&DSN_Name&"" SQLStmt = "SELECT * FROM Product" RS.Open SQLStmt, Connection, adOpenKeyset,adLockReadOnly RS.PageSize = 5 ScrollAction = Request("ScrollAction") if ScrollAction <> "" Then PageNo = mid(ScrollAction, 5) if PageNo < 1 Then PageNo = 1 end if else PageNo = 1 end if RS.AbsolutePage = PageNo %> List All Products
<% RowCount = rs.PageSize Do While Not RS.EOF and rowcount > 0 %>
PRODUCT ID  <%= RS("Product_ID") %> PRICE  <%= FormatCurrency(RS("Price"),2) %>
CATEGORY  <% If RS("CATEGORY") = "" Then %> None Specified <% Else %> <%= RS("Category") %><% End If %> WEIGHT  <% If RS("Weight") = "" Then %> None Specified <% Else %> <%= RS("Weight") %><% End If %>
DESCRIPTION
 <% If RS("Description") = "" Then %> None Specified <% Else %> <%= RS("Description") %><% End If %>
MESSAGE
 <% If RS("Message") = "" Then %> None Specified <% Else %> <%= RS("Message") %><% End If %>
LINK  <% If RS("Link") = "" Then %> None Specified <% Else %> <%= RS("Link") %><% End If %>
IMAGE PATH  <% If RS("Image_Path") = "" Then %> None Specified <% Else %> <%= RS("Image_Path") %><% End If %>
MANUFACTURER  <% If RS("MFG") = "" Then %> None Specified <% Else %> <%= RS("MFG") %><% End If %>
 
" method="Post">
" method="post">

<% RowCount = RowCount - 1 RS.MoveNext Loop %>
<% If RS.EOF Then RSEnd = "T" ELSE RSEnd = "F" End If %> <% 'Set RS = RS.NextRecordSet 'Loop set Connection = nothing %> <% If RSEnd = "F" Then %> <% if PageNo > 1 Then %> "> <% end if %> <% if RowCount = 0 Then %> "> <% end if %> <% Else %> <% End If %>

Add Product | Delete Product | List Products | Edit Product
Sales Reporting | Store Set-Up