[V4RB2] Convert_v1_v2 problem

Stan Busk maxprog at mac.com
Thu Feb 23 21:07:02 CST 2006


Can you use an ObjectPtr to store the record number of same table  
(target table would be self)? like I do with a VULong?
Like for example: myObjectPtr.Value = AddRecord()  rather than  
myVULong.Value = AddRecord()
(I am using Class way). What do I get doing that? myObjectPtr would  
have been updated properly after Convert_v1_v2 ?
Also, would you change all those VULongs I use that way to ObjectPtr?  
Both are 4 bytes by the way.
I use VULongs right now to store table records IDs and to link to  
other tables. I use ObjectPtr in another project though but because  
it is much more recent.

Stan

> On 2/23/06 7:25 PM, "Stan Busk" <maxprog at mac.com> wrote:
>
> Hi Stan,
>
>> Convert_v1_v2 function doesn't really convert, it creates a new
>> database. Ok.
>>
>> But, I think deleted records should be converted as well. Why?
>
> Not agree.
>
>> What if I have created a field in my table to store the record number
>> and then have access to it using it? If I delete records, it doesn't
>> matter, existing records 'myrec' field still contain the right value.
>
> If you have store Table.RecordNumber  then it is correct.
>
> IF you have store table.PhysicalRecordCount -- this is WRONG.
> You cannot do any assumption about physical way of record storage.
>
>
>> However, if you convert a v1 file to v2 format, all those deleted
>> records are not copied so BOOM you end up with records where your
>> special 'myrec' field is no longer pointing to itself but somewhere
>> else!
>
> IF you talk about ObjectPtr fields, then Valentina self correct  
> values,
> So they point to CORRECT new values.
>
>
>
>> Worse is if you use that 'myrec' field as a value on another table.
>>
>> I did not found out until a few days ago, actually it is just a
>> matter of adding code to refresh values but I think the Convert_v1_v2
>> function should generate a file in the *exact same state* as the
>> original, that includes the deleted records.
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list