<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' FileName="Connection_ado_access.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="true" ' Catalog="" ' Schema="" Dim MM_SanYangPai_STRING MM_SanYangPai_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("/access_db/SanYangPai.mdb") %> <% Dim rsRangeHoodCat Dim rsRangeHoodCat_numRows Set rsRangeHoodCat = Server.CreateObject("ADODB.Recordset") rsRangeHoodCat.ActiveConnection = MM_SanYangPai_STRING rsRangeHoodCat.Source = "SELECT * FROM tbl_RangeHood_Cat ORDER BY CatOrder ASC" rsRangeHoodCat.CursorType = 0 rsRangeHoodCat.CursorLocation = 2 rsRangeHoodCat.LockType = 1 rsRangeHoodCat.Open() rsRangeHoodCat_numRows = 0 %> <% Dim rsVideo Dim rsVideo_numRows Set rsVideo = Server.CreateObject("ADODB.Recordset") rsVideo.ActiveConnection = MM_SanYangPai_STRING rsVideo.Source = "SELECT * FROM tbl_Video ORDER BY VideoID ASC" rsVideo.CursorType = 0 rsVideo.CursorLocation = 2 rsVideo.LockType = 1 rsVideo.Open() rsVideo_numRows = 0 %> <% Dim rsRangeHood__MMColParam rsRangeHood__MMColParam = "4" If (Request.QueryString("CatRangeHoodID") <> "") Then rsRangeHood__MMColParam = Request.QueryString("CatRangeHoodID") End If %> <% Dim rsRangeHood Dim rsRangeHood_numRows Set rsRangeHood = Server.CreateObject("ADODB.Recordset") rsRangeHood.ActiveConnection = MM_SanYangPai_STRING rsRangeHood.Source = "SELECT * FROM tbl_RangeHood WHERE CatRangeHoodID = " + Replace(rsRangeHood__MMColParam, "'", "''") + " ORDER BY Model_ID ASC" rsRangeHood.CursorType = 0 rsRangeHood.CursorLocation = 2 rsRangeHood.LockType = 1 rsRangeHood.Open() rsRangeHood_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsRangeHoodCat_numRows = rsRangeHoodCat_numRows + Repeat1__numRows %> <% Dim Repeat3__numRows Dim Repeat3__index Repeat3__numRows = -1 Repeat3__index = 0 rsRangeHood_numRows = rsRangeHood_numRows + Repeat3__numRows %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = -1 Repeat2__index = 0 rsVideo_numRows = rsVideo_numRows + Repeat2__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rsRangeHood_total Dim rsRangeHood_first Dim rsRangeHood_last ' set the record count rsRangeHood_total = rsRangeHood.RecordCount ' set the number of rows displayed on this page If (rsRangeHood_numRows < 0) Then rsRangeHood_numRows = rsRangeHood_total Elseif (rsRangeHood_numRows = 0) Then rsRangeHood_numRows = 1 End If ' set the first and last displayed record rsRangeHood_first = 1 rsRangeHood_last = rsRangeHood_first + rsRangeHood_numRows - 1 ' if we have the correct record count, check the other stats If (rsRangeHood_total <> -1) Then If (rsRangeHood_first > rsRangeHood_total) Then rsRangeHood_first = rsRangeHood_total End If If (rsRangeHood_last > rsRangeHood_total) Then rsRangeHood_last = rsRangeHood_total End If If (rsRangeHood_numRows > rsRangeHood_total) Then rsRangeHood_numRows = rsRangeHood_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rsRangeHood_total = -1) Then ' count the total records by iterating through the recordset rsRangeHood_total=0 While (Not rsRangeHood.EOF) rsRangeHood_total = rsRangeHood_total + 1 rsRangeHood.MoveNext Wend ' reset the cursor to the beginning If (rsRangeHood.CursorType > 0) Then rsRangeHood.MoveFirst Else rsRangeHood.Requery End If ' set the number of rows displayed on this page If (rsRangeHood_numRows < 0 Or rsRangeHood_numRows > rsRangeHood_total) Then rsRangeHood_numRows = rsRangeHood_total End If ' set the first and last displayed record rsRangeHood_first = 1 rsRangeHood_last = rsRangeHood_first + rsRangeHood_numRows - 1 If (rsRangeHood_first > rsRangeHood_total) Then rsRangeHood_first = rsRangeHood_total End If If (rsRangeHood_last > rsRangeHood_total) Then rsRangeHood_last = rsRangeHood_total End If End If %> San Yang Pai - Home Pages
  Home Page  
Home
RANGE HOODS WATER SYSTEMS  
 
<% While ((Repeat1__numRows <> 0) AND (NOT rsRangeHoodCat.EOF)) %>
" class="sub_menu"><%=(rsRangeHoodCat.Fields.Item("Category").Value)%>
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsRangeHoodCat.MoveNext() Wend %>
<% Dim I I = 1 %> <% While ((Repeat3__numRows <> 0) AND (NOT rsRangeHood.EOF)) %> <% If I mod 2 = 1 then %> <% End If %> <% If I mod 2 = 0 then %> <% End If %> <% I = I + 1 %> <% Repeat3__index=Repeat3__index+1 Repeat3__numRows=Repeat3__numRows-1 rsRangeHood.MoveNext() Wend %>
">" width="200" height="150" border="0" />
<%=(rsRangeHood.Fields.Item("Model_No").Value)%>
<% While ((Repeat2__numRows <> 0) AND (NOT rsVideo.EOF)) %>
" class="sub_menu"><%=(rsVideo.Fields.Item("Video_Name").Value)%>
<% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 rsVideo.MoveNext() Wend %>
 
 
RANGE HOODS WATER SYSTEMS
 
 
 
1848 South San Gabriel Boulevard San Gabriel CA 91776 Tel: 626-571-2922, 626-571-2921. © Copyright SANYANGPAI INC. All Right Reserved.
<% rsRangeHoodCat.Close() Set rsRangeHoodCat = Nothing %> <% rsVideo.Close() Set rsVideo = Nothing %> <% rsRangeHood.Close() Set rsRangeHood = Nothing %>