[VSDK.framework] mMyTable.GetRecID() problems after SQL query

Eric Forget forgete at cafederic.com
Tue Nov 11 10:07:33 CST 2003


Hi Ruslan,

> You make big mistake when mix BaseObject API and Cursor API.
> This can cause problems if do wrong expectations.
> 
> When you do some SQL query or use later Cursor they CAN change current
> record of Table. You cannot expect that your current record of myTable will
> be the same after you do SQL on that table because INTERNALY Valentina also
> use that myTable to build cursors.

Ok, fine. But why GetRecID() do not returns the right recID? That's why I
was making the test, to specifically check whether the current record had
changed...

> If you want independent current records you need use CURSORS.
> 
> Also I wonder on your caching...why then not keep a cursor itself alive as
> long as you need?

I do not remember. I know that I have looked at them last winter and find
missing features. However, I cannot recall which ones.

I can rewrite my code to use the cursors. Unfortunately, it means retouching
about all the code accessing the database... Ouch!

I will try it...

Éric

___________________________________________________________________

 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