Forums
This topic is locked
Caching of resultset is session/global
Posted 18 Jul 2001 04:37:14
1
has voted
18 Jul 2001 04:37:14 Darren Pamatat posted:
Has anyone implemented caching of resultsets in the session and/or global application scope? How well does this integrate with ultradev? Can a disconnected resultset be specified as not to use sql server side resourses within in ultradev.Thanks,
Darren
Edited by - dp1795 on 07/18/2001 04:41:50
Replies
Replied 18 Jul 2001 13:43:23
18 Jul 2001 13:43:23 Joel Martinez replied:
no no no, whatever you do, don't put a recordset in any of those variables.
I forget why, something about the threading model of the object... but I've read many a thing against that.
if you really must do something like that... use the .getrows method of the recordset, then put the array into the session var.
(I do something similar to cache dynamic listboxes)
<pre id=code><font face=courier size=2 id=code>application("cache" = rs.getrows
rs.close
set rs = nothing</font id=code></pre id=code>
then to use it again:
<pre id=code><font face=courier size=2 id=code>rsarray = application("cache"
max = ubound(rsarray,2)
<b>for i=0 to max</b>
response.write rsarray(0,i)
<b>next</b></font id=code></pre id=code>
Joel Martinez
----------
Is this thing on?....
I forget why, something about the threading model of the object... but I've read many a thing against that.
if you really must do something like that... use the .getrows method of the recordset, then put the array into the session var.
(I do something similar to cache dynamic listboxes)
<pre id=code><font face=courier size=2 id=code>application("cache" = rs.getrows
rs.close
set rs = nothing</font id=code></pre id=code>
then to use it again:
<pre id=code><font face=courier size=2 id=code>rsarray = application("cache"
max = ubound(rsarray,2)
<b>for i=0 to max</b>
response.write rsarray(0,i)
<b>next</b></font id=code></pre id=code>
Joel Martinez
----------
Is this thing on?....