[ RB4] To test a cursor ?

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Oct 24 09:01:14 CDT 2003


on 10/24/03 8:19, Deane Venske at dean at eduss.com wrote:

> Deane Venske wrote:
> 
>> A pretty good method, in my opinion, to loop through records is the
>> following code which saves declaring integer variables to use in the
>> FOR loop.
>> 
>>  while cursor.NextRecord() = TRUE
>>    // Loop through records.
>>  wend
>> 
>> Deane Venske
>> 
>> _______________________________________________
>> Valentina mailing list
>> Valentina at lists.macserve.net
>> http://lists.macserve.net/mailman/listinfo/valentina
>> 
> Just looked over the code. Tim's code is better. Mine skips the first
> record *mutter*

Yes, your code skip the first record.


NOTE: some DBMS (and ODBC) love such loop.
    but it is crazy for me, that to be able do such loop,
    they use POSTION BEFORE FIRST RECORD

    yes, when they create cursor it is NOT on first record.


I never have like this, so in Valentina I have implement more logical way
IMHO.

And for Valentina more correct loop is

    curs = 

    do
        ....       
    while curs.NextRecord()

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list