Print Page | Close Window

Need help with multiple recordset navigation bar.

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=23432
Printed Date: 28 March 2026 at 11:23pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Need help with multiple recordset navigation bar.
Posted By: Bebopgeo
Subject: Need help with multiple recordset navigation bar.
Date Posted: 31 May 2007 at 1:09am
I have a page that has two dynamic tables on it. Each table has a different recordset assigned to it, and I have a different recordset paging navigation bar assigned to each one of the tables. So I can page throw the content from each recordset. But one of the page navigation bar takes over both of the bars and assigned the same recordset to both, and when I change one of the navigation bars to the right recordset then the other one changes too. So how can I maker each page navigation bar have it own recordset assigned to it so it will control the content on one dynamic table. I'm useing .asp VB



Replies:
Posted By: WebWiz-Bruce
Date Posted: 31 May 2007 at 8:52am
The simple way is to create a second recordset object for the second recordset.

The improved performance way is to use GetRows() to place the recordset into an array after reading in each recordset result from the database.

Do a Google search for GetRows() if you have not come across this method before.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Bebopgeo
Date Posted: 31 May 2007 at 4:32pm
I have two different dynamic tables and a different recordset assigned to each one, is that what you mean, or make two object or table for one recordset and one object or table for the other recordset?


Posted By: Freon22
Date Posted: 01 June 2007 at 4:33am
With the GetRows() method you load your query into a 2 dimensional array. You then close your recordset and your database connection. Now you have your array that you can work with kinda like a recordset.
 
So lets say I have to make two select queries to two different tables in my database. I can query one table use GetRows to put it into an array close the connection. Then call another query and put it into another array with the GetRows method, close the connections and recordset.
 
I now have two arrays and each one holds the rows from my query to the tables. I can work with them however I want now without having to worry if I am keeping my connection open to long and so on.
 
Google GetRows() you will find alot of information on it.
 
Edit: Sorry back to your question. This page navigation bar that you are using to page through your recordset. You are using two of them on the same page? Do they have the same variable names in them? I am thinking that if one or more of the variables are the same it will cause problems. You should check and if you have to run two recordsets then it maybe a good idea to call them different names like RS1 and RS2 also your sql statement should be different like SQL1 and SQL2. Anyway check to see if you have a variable in both navigation bars with the same name. 


Posted By: Bebopgeo
Date Posted: 02 June 2007 at 7:14pm
The recordsets have a different names and SQL statement for the recordsets just have a Request.QueryString ("LogID") with a MMColParam and the other has a MMColParam1 on it.  When I change the recordset in the show if. In the sever beavers for one of the navigation bars the other show if. for the other navigation bar change to the same recordset to. I will look at that GetRow() on google. Thinks



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net