I have an inventory of software system that I need to keep track of where each CD is, what page, etc.
I am trying to display one page at the time (4 CDs per page), but have option to goto next page. I display the data by book #.
If the page # only has 3 CDs, I want to diplay 3 CDs only and for the forth one, just a blank space(background picture). Right now it displays 3 CDs from the one page requested, but the forth one is from the next page.
How can I do this without limiting the data gathered from the SQL Database?
Request all the data from one book. Than display 4 records at the time across in a table, and if that one page has only 3 records, than display the forth one blank table. I hope this explains it right, I hope.
Each software title has a startpage. I tried SQL statement where StartPage = '" & WhichPage & "', WhichPage being a Request.QueryString, but if I do this, than the navigation system only comes up with 1 total pages and cant move to the next page.
This is what I have:
Set RS = Server.CreateObject("ADODB.Recordset"
RS.ActiveConnection = MM_ReportsRemote_STRING
RS.Source = "SELECT SoftwareInventory.SoftwareTitle, SoftwareInventory.StartPage, Software.SoftwareName, Software.SoftwareVersion FROM Software INNER JOIN SoftwareInventory ON SoftwareInventory.SoftwareTitle = Software.SoftwareID WHERE SoftwareInventory.BookID = '" & BookNumber & "' ORDER BY SoftwareInventory.StartPage ASC"
RS.CursorType = 2
RS.CursorLocation = 3
RS.LockType = 1
RS.Open()
If NOT RS.EOF then
RS.pagesize=mypagesize
RS.AbsolutePage = mypage
maxpages=cInt(RS.pagecount)
maxrecs=cInt(RS.pagesize)
The display:
<% dim i %>
<table width="560" height="280" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="6B8EB5" class="menu">
<!--DWLayoutTable-->
<% Do while not RS.EOF and RowCount < RS.PageSize %>
<tr>
<% for i=1 to 2 %>
<td width="280" height="280" background="../../../images/CDbg.jpg" bgcolor="#FFFFFF"><div align="center"><span class="linkbig"><font color="#000000"><em><%=RS("SoftwareName"
%></em></font></span><font color="#000000"><em><BR>
(<%=RS("Softwareversion"
%>)<% WhatPage = RS("StartPage"
%>
</em></font></div></td>
<% RS.movenext
RowCount = RowCount + 1
%>
<% if RS.EOF then exit for%>
<%next%>
</tr>
</tr>
<%loop%>
<tr><td colspan="2" valign="bottom" bgcolor="f0f0f0"><div align="right" class="Graph">Page#: <%Response.Write (WhatPage) %></div></td>
</table>
Currently:
Book #1.
Page 1 Ms Office Visio 5.0
Dreamweaver IBM PCOMM
But IBMPCOMM software belongs to startpage 2.
What I would like
Book #1.
Page 1 Ms Office Visio 5.0
Dreamweaver nothing
Page 2 IBM PCOMM Nothing
Nothing Nothing
I am trying to display one page at the time (4 CDs per page), but have option to goto next page. I display the data by book #.
If the page # only has 3 CDs, I want to diplay 3 CDs only and for the forth one, just a blank space(background picture). Right now it displays 3 CDs from the one page requested, but the forth one is from the next page.
How can I do this without limiting the data gathered from the SQL Database?
Request all the data from one book. Than display 4 records at the time across in a table, and if that one page has only 3 records, than display the forth one blank table. I hope this explains it right, I hope.
Each software title has a startpage. I tried SQL statement where StartPage = '" & WhichPage & "', WhichPage being a Request.QueryString, but if I do this, than the navigation system only comes up with 1 total pages and cant move to the next page.
This is what I have:
Set RS = Server.CreateObject("ADODB.Recordset"
RS.ActiveConnection = MM_ReportsRemote_STRING
RS.Source = "SELECT SoftwareInventory.SoftwareTitle, SoftwareInventory.StartPage, Software.SoftwareName, Software.SoftwareVersion FROM Software INNER JOIN SoftwareInventory ON SoftwareInventory.SoftwareTitle = Software.SoftwareID WHERE SoftwareInventory.BookID = '" & BookNumber & "' ORDER BY SoftwareInventory.StartPage ASC"
RS.CursorType = 2
RS.CursorLocation = 3
RS.LockType = 1
RS.Open()
If NOT RS.EOF then
RS.pagesize=mypagesize
RS.AbsolutePage = mypage
maxpages=cInt(RS.pagecount)
maxrecs=cInt(RS.pagesize)
The display:
<% dim i %>
<table width="560" height="280" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="6B8EB5" class="menu">
<!--DWLayoutTable-->
<% Do while not RS.EOF and RowCount < RS.PageSize %>
<tr>
<% for i=1 to 2 %>
<td width="280" height="280" background="../../../images/CDbg.jpg" bgcolor="#FFFFFF"><div align="center"><span class="linkbig"><font color="#000000"><em><%=RS("SoftwareName"
(<%=RS("Softwareversion"
</em></font></div></td>
<% RS.movenext
RowCount = RowCount + 1
%>
<% if RS.EOF then exit for%>
<%next%>
</tr>
</tr>
<%loop%>
<tr><td colspan="2" valign="bottom" bgcolor="f0f0f0"><div align="right" class="Graph">Page#: <%Response.Write (WhatPage) %></div></td>
</table>
Currently:
Book #1.
Page 1 Ms Office Visio 5.0
Dreamweaver IBM PCOMM
But IBMPCOMM software belongs to startpage 2.
What I would like
Book #1.
Page 1 Ms Office Visio 5.0
Dreamweaver nothing
Page 2 IBM PCOMM Nothing
Nothing Nothing