ASP - Array in Session Variable ? (JScript) 
Author Message
 ASP - Array in Session Variable ? (JScript)

I need the data in a RecordSet (result of a search) on another page (without
the possibility of doing another SQL-query to become the same RecordSet);

What's in fact the best solution?
1- putting the recordset into an array and the array in the Session
OR
2-is there a way to (JScript) use the RecordSet on another page?? (to be
able to browse through it; using 'MoveNext' etc.)

thanx!



Sun, 01 Sep 2002 03:00:00 GMT  
 ASP - Array in Session Variable ? (JScript)
1. If you have a form on your first page, you can use <input type="hidden"
value="<%=rst("whatever")%>">. On the second page, you can use
request.form("whatever") to get the data.
2. If you don't have a form on your first page, you can use <a href="
?=rst("whatever")">. On you second page, you can use
request.querystring("whatever") to get you data.
Quote:

> I need the data in a RecordSet (result of a search) on another page (without
> the possibility of doing another SQL-query to become the same RecordSet);

> What's in fact the best solution?
> 1- putting the recordset into an array and the array in the Session
> OR
> 2-is there a way to (JScript) use the RecordSet on another page?? (to be
> able to browse through it; using 'MoveNext' etc.)

> thanx!




Sun, 01 Sep 2002 03:00:00 GMT  
 ASP - Array in Session Variable ? (JScript)
If you are developing for an IE-only audience, consider using RDS on the client...

RDS Overview (Remote Data Services)
http://msdn.microsoft.com/library/psdk/dasdk/mdov17z9.htm

--
Michael Harris
MVP Scripting

I need the data in a RecordSet (result of a search) on another page (without
the possibility of doing another SQL-query to become the same RecordSet);

What's in fact the best solution?
1- putting the recordset into an array and the array in the Session
OR
2-is there a way to (JScript) use the RecordSet on another page?? (to be
able to browse through it; using 'MoveNext' etc.)

thanx!



Sun, 01 Sep 2002 03:00:00 GMT  
 ASP - Array in Session Variable ? (JScript)
I would recomend nr 1 since you don't want to use the database more then
once, I must say that I prefer to use the database many times over putting
an

<%
i=1;
while(!rsDB.EOF){
%>
    <input type="hidden" name="nr<%=i%>" value="<%rsDB('fieldname')%>">
<%
    rsDB.MoveNext();
    i++

Quote:
}

%>

and then send i to the next page to be able to get the information back, and
on the other page get the info in the same way:

ii=1;
s = new Array()
while(ii!=(i+1)){
    s[ii]=Request.Form('nr'+ii);
    ii++;

Quote:
}

or something like this.

For a number of reasons, mainly couse of changes to the database I guess,
though this works just as well I guess.....

// Malte ...


Quote:
> I need the data in a RecordSet (result of a search) on another page
(without
> the possibility of doing another SQL-query to become the same RecordSet);

> What's in fact the best solution?
> 1- putting the recordset into an array and the array in the Session
> OR
> 2-is there a way to (JScript) use the RecordSet on another page?? (to be
> able to browse through it; using 'MoveNext' etc.)

> thanx!




Fri, 06 Sep 2002 03:00:00 GMT  
 ASP - Array in Session Variable ? (JScript)
Hi

If i understand you guys correctly, you should check out
the docs for the Recordset
rs.PageSize
rs.AbsolutePage

--
Best Regards
   Vidar Petursson -  MVP
http://www.icysoft.com


No matter where you go there you are.
-

Quote:
> I would recomend nr 1 since you don't want to use the database more then
> once, I must say that I prefer to use the database many times over putting
> an

> <%
> i=1;
> while(!rsDB.EOF){
> %>
>     <input type="hidden" name="nr<%=i%>" value="<%rsDB('fieldname')%>">
> <%
>     rsDB.MoveNext();
>     i++
> }
> %>

> and then send i to the next page to be able to get the information back,
and
> on the other page get the info in the same way:

> ii=1;
> s = new Array()
> while(ii!=(i+1)){
>     s[ii]=Request.Form('nr'+ii);
>     ii++;
> }

> or something like this.

> For a number of reasons, mainly couse of changes to the database I guess,
> though this works just as well I guess.....

> // Malte ...



> > I need the data in a RecordSet (result of a search) on another page
> (without
> > the possibility of doing another SQL-query to become the same
RecordSet);

> > What's in fact the best solution?
> > 1- putting the recordset into an array and the array in the Session
> > OR
> > 2-is there a way to (JScript) use the RecordSet on another page?? (to be
> > able to browse through it; using 'MoveNext' etc.)

> > thanx!




Fri, 06 Sep 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Storing JScript Arrays in a Session Variable

2. Session("Variable") as Array ...ASP

3. ASP Session Variables / Arrays

4. Splitting Session Variable into several variables (array?)

5. Passing Array to Session Variable Then back to Array

6. Session variables and Arrays

7. storing a 2 dimensional array in a session variable

8. Multi-dimentional Arrays in Session Variables?

9. Help! Storing Arrays in Session Variables - problem

10. Session Variables and Arrays

11. How can I use an array as variable Session

12. Create a dynamic array from set of Session variables

 

 
Powered by phpBB® Forum Software