Memnoch1207
07-31-2002, 01:18 PM
here is the code on my asp page (this is just a test page to test the class I created)
<!--#include virtual="/core/classes/dbpaging.asp" -->
<!--#include virtual="/core/modules/common.asp" -->
<!--#include virtual="modules/asptemplate.asp"-->
<%
'create new aspTemplate object
set a = new aspTemplate
'create new dbpaging object
set t = new dbpaging
'pass table name to dbpaging set_table_name method
call t.set_table_name("catalogCategories")
'pass SQL string to dbpaging set_sqlString method
call t.set_sqlString("SELECT catId, des FROM catalogCategories ORDER BY des")
'pass records integer to be displayed per page
call t.set_recordsDisplayed(15)
'get total number of pages from dbpaging
numPages = t.calculate_totalPages()
'open global.asa specified connectionstring
db_open(application("connectionString"))
'set myD = dbpaging get_page funtion
set myD = t.get_page()
c = 1
'loop through the records adding 1 to the count;
'til EOF or count = recordsDisplayed integer
do until c = myD.Count
a.setVariable "FIELD1", myD(c)("catId")
a.setVariable "FIELD2", myD(c)("des")
c = c + 1
loop
'close the db connection
db_close
%>
<table width="50%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">{{FIELD1}}</div></td>
<td><div align="center">{{FIELD2}}</div></td>
</tr>
</table>
<%response.Write("The SQL query is: " & sqlString)%>
<br>
<br>
<%response.Write("The table name is: " & tableName)%>
<br>
<br>
<%response.Write("The # of pages is: " & numPages)%>
the problem I am having is it is not getting the records from the database...How can I test to see if the info is being passed to the class??? I tried to do something like that above (with the last 3 response.write lines) Is there a way to see if the class is even getting the information??
Here (http://www.visualbasicforum.com/t33903.html) is a link to the class it calls.
<!--#include virtual="/core/classes/dbpaging.asp" -->
<!--#include virtual="/core/modules/common.asp" -->
<!--#include virtual="modules/asptemplate.asp"-->
<%
'create new aspTemplate object
set a = new aspTemplate
'create new dbpaging object
set t = new dbpaging
'pass table name to dbpaging set_table_name method
call t.set_table_name("catalogCategories")
'pass SQL string to dbpaging set_sqlString method
call t.set_sqlString("SELECT catId, des FROM catalogCategories ORDER BY des")
'pass records integer to be displayed per page
call t.set_recordsDisplayed(15)
'get total number of pages from dbpaging
numPages = t.calculate_totalPages()
'open global.asa specified connectionstring
db_open(application("connectionString"))
'set myD = dbpaging get_page funtion
set myD = t.get_page()
c = 1
'loop through the records adding 1 to the count;
'til EOF or count = recordsDisplayed integer
do until c = myD.Count
a.setVariable "FIELD1", myD(c)("catId")
a.setVariable "FIELD2", myD(c)("des")
c = c + 1
loop
'close the db connection
db_close
%>
<table width="50%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">{{FIELD1}}</div></td>
<td><div align="center">{{FIELD2}}</div></td>
</tr>
</table>
<%response.Write("The SQL query is: " & sqlString)%>
<br>
<br>
<%response.Write("The table name is: " & tableName)%>
<br>
<br>
<%response.Write("The # of pages is: " & numPages)%>
the problem I am having is it is not getting the records from the database...How can I test to see if the info is being passed to the class??? I tried to do something like that above (with the last 3 response.write lines) Is there a way to see if the class is even getting the information??
Here (http://www.visualbasicforum.com/t33903.html) is a link to the class it calls.