Cannot set record lock (error 363)
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri Sep 19 16:39:09 CDT 2003
on 9/19/03 4:26 PM, Florian Bogeschdorfer at fb at memedia.de wrote:
> Hi Ruslan and Igor
>
>
> i need some explanation on read/write and cursors that I have not found in the
> docs.
>
> Say I have a database with adresses.
>
> Example 1:
>
> i open on computer A a cursor with all records. It is read/write since I want
> to make small updates with updateRecord()
> now I do the same on computer B but I get error 363
Yes this is correct.
Second client need catch error, and try again.
> Example 2:
>
> I open this cursor on A with all records read/write
> Now I want to make a new record in the corresponding table, I use as in your
> docs
> AddRecord( theCursor, [theFirstName, theLastName, theBornDate] )
>
> while I build a new cursor just for adding a record ( I saw this in some
> tutorial from your site)
>
> But I get error 363
Hmm, this is strange. Must work.
> NOW:
>
> Is it true that I can not write to 2 cursors off the same table even when
> their currentRecord is different?
Yes. Only cursor that have lock for READ WRITE can edit it.
> Will I have to make a readonly cursor for browsing the records and then for
> writing build another cursor?
Note, that you can also build cursor for browsing with NoLocks
In this case it will not prevent modifications.
> Sonething like "select cursor with current
> record for read/write, write, close cursor, update current cursor"?
Or simply call "INSERT/update WHERE RecID = n" command
But a record to be modified must be not locked of course by somebody.
> All cursors are serverside. Is there a difference when I build them client
> side?
It seems yes. Client size cursor COPY all selected records to client RAM.
So you must not use client side cursor for big selections.
After client-side cursor copies records, it unlocks records in real table,
Because they already cannot be modified by this cursor.
--
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