Subject | RE: [firebird-support] get_lock / release_lock |
---|---|
Author | Doru Constantin |
Post date | 2008-07-31T08:33:08Z |
So, you say that I can modify for 30 minutes a document and then I try to
see if I can commit the changes?
I need to know that I can comit the changes before I begin to modify the
doc. It is like pessimistic locking but without any record lock.
Doru
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: 31 iulie 2008 11:21
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] get_lock / release_lock
At 05:45 PM 31/07/2008, you wrote:
mechanism with an exception routine and it is done.
belong to.".
transaction knows when it has a lock (and when it hasn't). All your
application has to do is try the operation: if it succeeds then it has the
lock; if it fails, then it is denied the lock.
./heLen
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
see if I can commit the changes?
I need to know that I can comit the changes before I begin to modify the
doc. It is like pessimistic locking but without any record lock.
Doru
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: 31 iulie 2008 11:21
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] get_lock / release_lock
At 05:45 PM 31/07/2008, you wrote:
>I have an old app: vfp + odbc + mysql.That is how Firebird works - automatically. Replace this get_lock()
>I try to replace mysql with minimal change in code.
>
>In this app when a user is add/modify/delete a document the get_lock()
>function is called and if the lock is get then the user can continue
>otherwise don't.
mechanism with an exception routine and it is done.
>I read about RDB$SET_CONTEXT / RDB$GET_CONTEXT, but "... variables may beread and written to and by whom are determined by namespace which they
belong to.".
>No, you don't. Each transaction works inside its own context. A
>I need RDB$SET_CONTEXT / RDB$GET_CONTEXT but in a global context.
transaction knows when it has a lock (and when it hasn't). All your
application has to do is try the operation: if it succeeds then it has the
lock; if it fails, then it is denied the lock.
./heLen
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links