[V4RB] should i kill this VCursor? [was, 3 simple [?] questions]

Pedro fp lists at pedro.Net.au
Wed Mar 5 07:17:35 CST 2003


G'day Folks

I'm still breaking out of the REALdb way of doing things & just 
realised that the VCursor that I have had as a property of a class 
could be a sub-class of VCursor. If i keep the general mechanism the 
same thne when imprting files of data that VCursor could be 
re-instantiated repeatedly in a loop. Should I explicitly kill the 
VCursor before the next statement like this?

   for ...
     cur = new myVCursor( dbName, SQLstring )
     ... ' see my next question
     cur = nil
   next

or is this OK?

   for ...
     cur = new myVCursor( dbName, SQLstring )
     ... ' see my next question
   next

Am I correct in thinking that it'd be OK to give the constructor of a 
sub-class of VCursor additional parameters? If so I could move the code 
that follows creation of the cursor into the cursor which I think would 
be an improvement for this project [if not others as well].

On Thursday, February 27, 2003, at 01:35  AM, Keith DeLong wrote:

>> 1. Closing vCursor ... With READdb I found that it is absolutely
>> crucial that RecordSets be explicitly closed when finished with. I
>> started porting my project planning to follow similar practice with
>> Valentina but haven't found any way to explicitly close a vCursor. Is
>> it necessary? If so how is it done? With cur = nil?
>
> Yep - cur = nil is what you'll want to destroy cursors that are not 
> dimmed
> local to a method.

Cheers, Pedro :-)

Web: <http://www.pedro.net.au>                    PGP Key ID: 387CD96F
Instant messaging...  AIM: bandidoOfOz  ICQ: 27671678  Jabber: pedrofp
                       MSN: mail at pedro.net.au           Yahoo: pedro_fp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"[the digital divide] is just a new sticker we use to cover up a
more important word: poverty. I don't think we should worry about
the digital divide nearly as much as we should worry about poverty.
It's all over the planet."
                       Apple co-founder & CEO Steve Jobs, April 2001





More information about the Valentina mailing list