ASP 101 - Active Server Pages 101 - Web06
The Place ASP Developers Go!

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

 Top ASP 101 Stories Top ASP 101 Stories
VBScript Classes: Part 1 of N
Migrating to ASP.NET
Getting Scripts to Run on a Schedule

Improve efficiency with server-side includes
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates

Quick Tips

Keep Track of Multiple Current Records

So you're building an ASP page that uses data from a recordset and you realize that things would be much easier if you could just keep track of multiple current records. Guess what... you can!

Enter recordset cloning. It's not quite what you'd think it'd be. There are no sheep involved... just kidding! The Clone method doesn't create another copy of the data, but instead creates another copy of the recordset object. Because of this, it's more efficient then opening another connection to the database and any change you make to the data in one is immediatly reflected in the other.

The concept can actually get a little confusing, but there are times when it can come in handy and it's really easy to do:

Set rstClone = rstSheep.Clone

You'll now have two copies of the original recordset. They'll both contain the same records, but you can filter and move through them independently.

And if you want your new clone to be read-only, that's easy enough too:

Set rstClone = rstSheep.Clone(adLockReadOnly)

For more information on cloning, you might want to read the documentaion for the Clone method of the Recordset object from MSDN.

Previous      Show All Tips      Next

If you have a tip you would like to submit, please send it to:

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers