V4RB - Version 1.10 vs 1.11 and Encryption

Russ Tyndall fitzbew at nc.rr.com
Thu Oct 27 05:11:17 CDT 2005


On 10/27/05 2:29 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 10/27/05 1:54 AM, "Russ Tyndall" <fitzbew at nc.rr.com> wrote:
> 
>>> I can assume that 1.11 is more strict on record locks, than 1.10
>>> 
>> 
>> Parameters were never changed before or during switching out of plugin.
>> 
>> Here is line that makes vCursor:
>> 
>>    rstDB = dbAvx.SqlSelect("Select common_name, sort_id, species_no from
>> species where active = 'Y' order by sort_id", kV_Client, kV_ReadOnly,
>> kV_Random)
> 
> You only read this cursor?
> 
>> I don't know why fourth parameter is Random, could just be ForwardOnly.
>>   Random access is not necessary.
> 
> If you do not use PrevRecord, FirstRecord, then you can use ForwardOnly.
> 
> But this is just optimization. ForwardOnly cursor unlock record as only you
> move to next. Because you have promise never return back.
> 
> 
>> Still, that *should* not cause Nil
>> vCursor, should it? Even with more strict cursors in 1.11?
>

Changed cursor setting from kV_Random to kV_ForwardOnly to see if it made
any difference in 1.11 plugin. See my next note.
 
> It can return nil only in case of some error.
> You have check error ?
> 

If vCursor is set to kV_Random, then error code is 0, no ErrString in DB.
Just get Nil vCursor.

BUT, after changing vCursor to kV_ForwardOnly (no other changes), suddenly
363 error code appeared!

This made me look harder for contention, and found problem in a Thread
class.  Commented that out, and now cursor works fine in 1.11. So, Ruslan,
you were right as usual --- record locks problem.

Had to make some other changes to accommodate "stricter" Valentina in 1.11,
but nothing major. For example, had to set vCursor in one routine to Nil.
V4RB had not complained before.

> 
> Please check error code. If cursor fail to create, then was some error.

Was not getting error code, until changed type to kV_ForwardOnly.  Then, got
363. (still no error string)

By the way, I think other error packages I sent you were not generating
error numbers, only Nil vCursors.  Of course, those were for 2.x so probably
not relevant.

For archive purposes: Just a reminder, all these problems (my fault, mainly)
only appeared in Encrypted databases under 1.11.  Everything worked fine in
1.10, and in 1.11 if 1.11 db was not encrypted.

So, I suggest: 1.11 is more strict with cursors than 1.10 and MUCH more
strict if DB is encrypted.

Russ Tyndall
Wake Forest, NC





More information about the Valentina mailing list