V4RB 1.1 RB 5.5 cursors
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Jun 14 11:40:44 CDT 2004
On 6/14/04 9:28 AM, "olivier vidal" <vidal_olivier at yahoo.fr> wrote:
> - in kernel doc :
>
> "in the case Valentina cannot obtain lock for at least one record of
> cursor, it return error kCannotSetLock and cursor is not created"
>
> Nevertheless, if I create e.g., a cursor with a READ / WRITE lock on 1
> recording, and which I try then to create a READ cursor on the same
> recording, my application crashes. It is normal that the second cursor
> is not created, but how to avoid the crash?
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()
> - Even if I create small cursors opened little time. How the server is
> going to react when two users will try to put a lock at the same time
> on the same recording?
There is no IN THE SAME TIME.
Exists queue.
> If the first cursor is fast and is opened little time, the demand of
> lock of the second cursor is put in wait and is treated as soon as
> possible? Or there is an error and the second cursor is not created?
You get error.
I think future we will add some e.g. 3 seconds delay
And ability to control this.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list