[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Limiting the number of records displayed on a page when the query is based on another request variable

Asked by smanthanims in Active Server Pages (ASP)

Standard ASP code exists for limiting the number records on a page and letting the user scroll through the records by page.
http://www.aspwebpro.com/aspscripts/database/displaynrecordsperpage.asp
The code works very well when the query is a standard one
for example

rscdbadd.open "select * from tblbasicAPPL where padmcode=1",objdbconnPGDclr,1,1

The code is not working for pages other than the first 10 records when the query is based on
a request variable, for example

rscdbadd.open "select * from tblbasicAPPL where padmcode=" & Request("padmcode"), objdbconnPGDclr,1,1

The following error message is given

Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
/ne/apPGDclr/apPGDclrecPADMadmproc.asp, line 28


The entire code is shown below

Can anyone help in modifying the code to make it work
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
<%@ Language=VBScript %>
<!--#include file="apPGDclrDBCONN.asp"-->
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<html>
<body>
<%
response.write examtitle & "<br>"
response.write "Admission Proceedings:" & request("padmcode")
%>
<table border=3>
<tr>
<td> S.No </td>
<td> Subject </td>
<td> HTNO </td>
<td> Name </td>
<td> Rank</td>
<td>SS</td>
<td>Univ</td>
<td>Admission Remarks</td>
<%
DIM intPageRecords, intRecords, intRecordCount, intCurrentPage
DIM intNumberOfPages, intDisplayPage
intPageRecords = Request.Querystring("page")
IF intPageRecords = "" THEN intPageRecords = 1 : intRecords = 1
intRecords = intPageRecords
intPageRecords = ((intPageRecords - 1) * 10) +1
intRecordCount = 0
rscdbadd.open "select * from tblbasicAPPL where padmcode=" & Request("padmcode") & " and  cdhcrcd=1 order by subid, rank",objdbconnPGDclr,1,1
if rscdbadd.bof and rscdbadd.eof = true then
response.write "There are no records"
end if 
rscdbadd.Move (intPageRecords - 1)
dim rn
rn=0
'while not rscdbadd.eof 
DO WHILE intRecordCount < 10 and NOT rscdbadd.EOF
rn=rn+1
response.write "<tr>" & "<td>" & rn & "</td>"
response.write "<td>" & rscdbadd("Subject")  & "</td>"
response.write "<td>" & rscdbadd("htno")  & "</td>"
response.write "<td>" & rscdbadd("cname") & " " & rscdbadd("initials") & "</td>"
response.write "<td>" & rscdbadd("rank")  & "</td>"
response.write "<td>" & rscdbadd("SS")  & "</td>"
response.write "<td>" & rscdbadd("Univ")  & "</td>"
response.write "<td>" & "______________________"  & "</td>"
rscdbadd.movenext
intRecordCount = intRecordCount +1
Loop
%>
</table>
<%=intPageRecords%> - <%=intPageRecords+(intRecordCount-1)%> of 
<%=(rscdbadd.RecordCount)%> Candidates
<p>Scroll Through More candidates
<%
intCurrentPage = Request.Querystring("page")
IF intCurrentPage = "" THEN intCurrentPage = 1
intNumberOfPages = int(rscdbadd.RecordCount \ 10)
IF rscdbadd.RecordCount MOD 10<> 0 THEN intNumberOfPages = intNumberOfPages + 1
Response.Write("Pages: [")
FOR intDisplayPage = 1 TO intNumberOfPages
IF Cint(intDisplayPage) = Cint(intCurrentPage) THEN
Response.Write " <b>" & intDisplayPage & "</b> "
ELSE
Response.Write " <a href=""apPGDclrecPADMadmproc.asp?page=" & intDisplayPage & """>" & intDisplayPage &"</a> "
END IF
NEXT
Response.Write ("]")
%>
 
 
<%
rscdbadd.close
set rscdbadd=nothing
set objdbconnPGDclr=nothing
%>
</html>
[+][-]10/11/09 07:52 AM, ID: 25546102Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Active Server Pages (ASP)
Sign Up Now!
Solution Provided By: gawai
Participating Experts: 3
Solution Grade: A
 
[+][-]09/17/09 01:46 PM, ID: 25360885Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/17/09 06:45 PM, ID: 25362483Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/03/09 12:51 AM, ID: 25484304Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/03/09 02:21 AM, ID: 25484524Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/03/09 02:26 PM, ID: 25487211Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/09 11:31 AM, ID: 25518385Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/07/09 02:39 PM, ID: 25520399Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/09 10:26 PM, ID: 25522484Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/09/09 11:51 PM, ID: 25541103Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/10/09 12:51 AM, ID: 25541234Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/10/09 12:52 AM, ID: 25541238Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/11/09 07:20 AM, ID: 25545996Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/11/09 08:02 AM, ID: 25546142Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/11/09 08:08 AM, ID: 25546163Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625