V4RB 1.1 RB 5.5 cursors
olivier vidal
vidal_olivier at yahoo.fr
Mon Jun 14 12:26:48 CDT 2004
>
> I think 2 ways
>
> 1) curs = db.SqlSelect()
>
> Now you must check if cursor is not nil
>
> if( curs <> nil )
> then you use it
>
>
> 2) also you can and should check error code after SqlSelect()
>
Ah, I understand now!
It is necessary to use cursor=database.sqlselect () !
To use a cursor, I always use a constructor to obtain a subclass of
Vcursor (for triggers....).
And I already test if curs < > nil and verified the errors + realbasic
NilObjectException. But from the construction of the cursor, if there
was an error (wrong sql string, lock cursor....), my app crashed
immediately.
Why?
in V4RBR doc (p.62):
"If you want to define a subclass of Vcursor than you need to use the
constructor of vCursor"
But if there is no security with constructor, it is very boring !
There is not the other solution to use a subclass of vcursor and be
also able to handle errors ?
>
> There is no IN THE SAME TIME.
>
> Exists queue.
>
> You get error.
>
> I think future we will add some e.g. 3 seconds delay
> And ability to control this.
> macserve.net/mailman/listinfo/valentina
In Valentina 1.x,
in multi-user application, To be certain that the cursor is create, it
is always necessary to test it in a loop and to try to create it as
long as the error " KCannotSetLock " returned ?
It is the solution?
thank you
olivier
More information about the Valentina
mailing list