On Feb 02, 2007, at 10:10 UTC, Bart Pietercil wrote:

> I generate new Records ( through the data received from the server)  
> in my ServerDB class
> Now I would like to add (or insert) the new records to a recordset,  
> something like:
> 
> RS = new RecordSet
> RS.addRecord(myRecord)
> 
> but I can't find a way of doing this.

That violates what a RecordSet is.  Remember that in most cases
(depending on the database engine), a RecordSet is NOT a bunch of data
in memory.  It's something tied to the database engine (sometimes
called a "cursor"), which gives you a way to ask the actual database
for the values of the current row or to advance to the next row.  (Or,
in SOME engines, to back up to a previous row as well.)  Think of it
more like a socket or a serial port.

So, when you need to be modifying the data or adding or subtracting
things, you're no longer dealing with a RecordSet; you need to load all
the data in to memory and work with it.  I do this by converting the
RecordSet to an array of Dictionaries.  Accessing values in a
Dictionary is almost the same as accessing them from a RecordSet, but
of course you can munge an array of Dictionaries however you like.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
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