Thursday, 22 August 2013

classic asp query a recordset rather than a table

classic asp query a recordset rather than a table

So, you have a recordset created like this:
Set rs = Server.CreateObject("ADODB.Recordset")
And you fill it like this:
rs.Open queryString, AuthConn, adOpenKeyset, adLockReadOnly
My question is, I want a second recordset that is a subset of the first
(rs) recordset, can you do this in classic asp
Set rs2 = Server.CreateObject("ADODB.Recordset")
My immediate guess is that it would be something like this
rs2.Open queryString, rs, adOpenKeyset, adLockReadOnly
Why you ask? Well we have an older site that we are updating and adding
new features too and rather than change a LOT of code I was wondering if I
could be sneaky and use a setset of an already created (large) recordset,
to save on another query to the db etc. Just wondering if it can be done.
Thanks,

No comments:

Post a Comment