If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Paging Records in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-11-04, 15:16
Iron_Bunny Iron_Bunny is offline
Registered User
 
Join Date: Mar 2004
Location: Montreal
Posts: 3
Paging Records in ASP

I've found a few sites about paging recordsets in ASP as well as the thread on this board and I have used so many examples on how to page through records. I keep getting the same problem. I have a search and when the search returns the results on the 2nd page, you see the first 5 results of the query. Good. But when I click on the first/previous/next/last buttons, it navigates the 5 records through ALL the records and not just the results from the query. Any tips or suggestions where my error could be, would be very helpful. Thanks.
Reply With Quote
  #2 (permalink)  
Old 03-11-04, 21:44
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
No very clear to your question. What does it mean?

"it navigates the 5 records through ALL the records and not just the results from the query."
Reply With Quote
  #3 (permalink)  
Old 03-12-04, 01:31
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Maybe the criteria used in the first (good) SQL statement needs to be saved in session variables for future use.
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #4 (permalink)  
Old 03-12-04, 09:04
Iron_Bunny Iron_Bunny is offline
Registered User
 
Join Date: Mar 2004
Location: Montreal
Posts: 3
Red face

Sorry, I'll try to explain it better:

I have a search and results come up. Let's say there are 830 records in my database and my search brings up 40. So my results page displays the first 5 of the 40. When I click "next", it displays the second set of 5 out of my 830 records.
Reply With Quote
  #5 (permalink)  
Old 03-18-04, 19:36
kenyanboy kenyanboy is offline
Registered User
 
Join Date: Mar 2004
Location: Nairobi
Posts: 6
Check if you are passing the search criteria when you click "Next".

For example if your search begins at a form with a textbox called SearchBox and you are passing the criteria through a querystring your URL should have something like ?SearchBox=MySearchTerm at the end of it, make sure that when you click on "Next" you are passing the querystring in the URL for "Next".
Reply With Quote
  #6 (permalink)  
Old 03-19-04, 09:40
Iron_Bunny Iron_Bunny is offline
Registered User
 
Join Date: Mar 2004
Location: Montreal
Posts: 3
Okay I got it working! I used a hidden field to pass my sql query and made sure all my links submittied. Thanks!
Reply With Quote
  #7 (permalink)  
Old 06-04-04, 21:11
Wajahat_Kaleem Wajahat_Kaleem is offline
Registered User
 
Join Date: Jun 2004
Posts: 2
Question String Validation Using Vb Script

Is there any function in vb script that helps us to checks that
the input entered in textbox is Alpha
Plz
Reply With Quote
  #8 (permalink)  
Old 06-07-04, 14:01
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
There is no specific function in VB Script to check if the input is alphabetic string, but you can create one or you can use JavaScript to check the input on the client browser.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On