[VSDK] VDK_Cursor::Update() broken?

Eric Forget forgete at cafederic.com
Wed Jan 7 12:09:48 CST 2004


>> Do you create the Cursors "updatable"? I failed in this when I went
>> från 1.9.7 -> 1.9.8.
> 
> I think Eric has switch to record locks far ago.

I'm not sure what Totte means by Cursor "updatable"?

All my cursors are created that way:

    new VDK_Cursor(myDB, kClient, kNoLock, kRandom)
 
>> // Totte
>> 2004-01-07 kl. 11.15 skrev Eric Forget:
>> 
>>> Hi Ruslan,
>>> 
>>> It seems that VDK_Cursor::Update() is broken. It does not always
>>> commit the changes to disk... Any idea?
> 
> What this means?

Let me explain how I use the cursors. Essentially, I always have 3 cursors
alive on my database at any time.

1) All the fields of the current record, as seen by the UI.

2) The list of all the records (RecID + Name) that meet some criteria (e.g.
Name filter, label = 1)

3) I have a few "view as" like view as Label. So, the third is all the
distinct name for the current view as.

I have a few rules to delete one or the two others and recreate them when
necessary. 

> -- for some cursors?

I found only the problem with cursor 1)

> -- for some records of cursor?

Yes, only for some records. If I go to the problematic record, make a
change, ask the value again to the cursor it seems ok. However, if I delete
the cursor, then recreate it to request the value of the same record, the
database looks to have never been updated.

> -- Does flush() "commit" them?

I've just try it and it change nothing.

> -- cursor is not Read Only ?

Always kNoLock

> -- record locks correct?

Hmm, what do you means by that?

> -- some error codes in return ?

VDK_Cursor::Update() just return a bool. Is there something I missing about
it? There is no C++ exception thrown if it what you means? And Update()
always return true.

Eric

___________________________________________________________________

 Eric Forget                       Cafederic
 ForgetE at cafederic.com             <http://www.cafederic.com/>

 Fingerprint <86D5 38F5 E1FD 5D9C 71C3  BAA3 797E 70A4 6210 C684>




More information about the Valentina mailing list