On Oct 9, 2006, at 9:05 PM, Daniel L. Taylor wrote:

I have some questions regarding the RecordSet class that I hope somebody can
help me with.

1) You execute a query and have a RecordSet. Does the RecordSet maintain the entire current record in memory, the entire collection of records, or does
it only read data from the database on demand, i.e. when you call
RecordSet.Field? (I'm *guessing* it holds the current record in memory,
which is why you can't move backwards with some databases.)

I think this is greatly dependent on the db, if I need to keep local copies of record sets I tend to put them in local RealDB and work with them there, it is a lot faster for large datasets that I am going to be working with a lot, rather then connecting to a remote mysql db all the time. Of course this is only for data that I am fairly certain is not volatile.

2) Is there any penalty for keeping an open RecordSet around for a long
time? What if there are a lot of open RecordSets?

I have had connections to MySQL timeout then had the app tie itself in knots.


Here's why I'm asking. I have a project with a lot of tables. For this
project, in some ways it would be beneficial to wrap records in classes, but
I'm not sure if it would be best to query, read RecordSet data into
properties, then close the RecordSet, re-opening it later and mapping
property-to-field for updates. OR if it would be better to keep the
RecordSet in a private property of the class, and have public properties
which actually just read from/write to the RecordSet in real time. I'm
tempted to do the last one in this case.

Any thoughts on this?

Sam D

ps Hey Dan, we both seem to be in similar circles these days...

========
http://blog.samdevore.com/
J. S. Bryan - "Many men can make a fortune but very few can build a family."

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to