Sets from Cursors Re: VCursor.AddRecord
Ed Kleban
Ed at Kleban.com
Fri Dec 2 15:09:46 CST 2005
On 12/2/05 12:35 PM, "Sims, John" <ayu8 at cdc.gov> wrote:
> Abbott and Costello
> Laurel and Hardy
> Kleban and Sims ---- Doesn't quite have the same ring to it :-)
>
> That said, I'm willing to do the straight man thing for free.
>
> As for the topic at hand, we could certainly work around this by making
> sure to request RecID for the Vcursor then iterating through the Vcursor
> and pushing the RecID into an Array (or custom class if you wanted to do
> fancier things) but it would be nice to not have to request the RecID
> and still get the benefit of being able to iterate through the RecIDs.
>
> You know, as I'm typing here, it has occurred to me that Vset has
> Append/Remove methods so we could really just do this ourselves (though,
> performance-wise, probably not as fast as Ruslan could implement). But,
> we could extend Vcursor (I'm pretty sure you are an RB guy) and add a
> ToBitSet and/or ToArraySet method ourselves. As long as you remembered
> to pull back the RecID in the query, this shouldn't be too difficult to
> do. Even more interesting might be if you pulled back the RecID of the
> "main" table and the RecID(s) of a related table(s), you could make the
> extends methods where you pass the field from the Vcursor you want to
> create a Vset for then you could easily create an iterator for both the
> "main" table and the related table(s).
>
> Ok, I gotta get back to work. Sorry for the "stream of thought" post.
> I don't have time to really thing through all of this here at work. I
> hope I have made enough sense.
Technical sense? yes. Practical sense? no. Efficiency is the name of the
game here. I have no interest in manually building a VSet through a
tortuously slow procedure just so I can have the benefit of passing it to a
function that can use it rapidly. Far better to just write the more
complex SQL or iterate through the cursor and be done with it.
> Take care.
>
More information about the Valentina
mailing list