V4MD.x32 question

Ruslan Zasukhin ruslan at paradigmasoft.com
Thu Oct 19 10:15:59 CDT 2006


On 19.10.2006 07:59, "dave" <dcaruso3 at verizon.net> wrote:

> hello
>  
> a question about valentina 1.1
>  
> when i build my records one of the fields is the number of the record when it
> is added.  so if i have 5 records i have something like this:
>  
> field a , field b , record # 1
> field a , field b , record # 2
> field a , field b , record # 3
> field a , field b , record # 4
> field a , field b , record # 5
                      ^^^^^^^^^^ this is your own field
                            and you self assign numbers?

  
> so i delete record # 3 and now have this:
>  
> field a , field b , record # 1
> field a , field b , record # 2
> field a , field b , record # 4
> field a , field b , record # 5

ok

Is THIS state is okay for your logic?
When one record and one number is missing?
  
> now i put in a new record and i get this:
>  
> field a , field b , record # 1
> field a , field b , record # 2
> field a , field b , record # 6
> field a , field b , record # 4
> field a , field b , record # 5

right
 
> so when i try to access my data based on the record number
> i have five records but numbered to 6
> needless to say this causes some problems.

  
> this is basicly what i do:
>  
> addrecord(cursor,field:data.......)
> updaterecord(cursor)
> getposition(cursor)+1  if i dont add the 1 i then have two records with the
> same record #
> does addrecord move the cursor position to the the record just created?

> is there a way to remove the hole left by using deleterecord?
> i'm just not sure what is going on here.

New record (6) was placed into physical space of deleted record 3.
This is right.

You never should do any assumption about WHERE and HOW record will be
stored.  

------------
Explain me your task please.

You want to have N items in the table, and each item is numbered
in the range 1..N  ?

But in this case your FIRST state right after delete of record 3
Also do not satisfy this rule. RIGHT?


Question is WHY you want this ?

When Valentina Studio show result of SELECT * FROM T
On left side you can see numbers of N found records.
Isn't this enough ?



-- 
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]




More information about the Valentina mailing list