Subject | RE: [IBO] Table locking with Delphi/IBObjects |
---|---|
Author | Svein Erling Tysvær |
Post date | 2008-10-07T06:36:53Z |
Why do you think you need a table lock? I'm not saying it is incorrect, it is just an unusual requirement when using Firebird. When doing DDL (Data definition language), then it is best to have exclusive access to the entire Firebird database, not just the table. When doing DML (Data manipulation language), a client/server database like Firebird would normally be happy to accept simultaneous requests with record level exclusivity.
Set
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of olgreyfox15
Sent: 7. oktober 2008 01:48
To: IBObjects@yahoogroups.com
Subject: [IBO] Table locking with Delphi/IBObjects
I,m working on an application that uses Delphi7, IBObjects 4.6, and
Firebird 2.1. I can have multiple users simultaneously inserting
records to a table (AT_STATEMENT) from different PCs on the network. I
need to temporarily prevent User B from inserting until User A's
insert is completed & committed. Then User B's application needs to
check the data state before doing its insert. In absence of better
knowledge, I'm assuming this needs a table lock on AT_STATEMENT. If
so, what is the best way to do this? The way I'm doing it works only
in one specific instance, and seems to deadlock (or lock conflict) any
subsequent inserts/deletes from other places in the application (other
forms, other queries, etc.)
I know Delphi fairly well; but transaction processing is relatively
new to me.
Thanks in advance
Lane Campbell/OlGreyFox
------------------------------------
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links
Set
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of olgreyfox15
Sent: 7. oktober 2008 01:48
To: IBObjects@yahoogroups.com
Subject: [IBO] Table locking with Delphi/IBObjects
I,m working on an application that uses Delphi7, IBObjects 4.6, and
Firebird 2.1. I can have multiple users simultaneously inserting
records to a table (AT_STATEMENT) from different PCs on the network. I
need to temporarily prevent User B from inserting until User A's
insert is completed & committed. Then User B's application needs to
check the data state before doing its insert. In absence of better
knowledge, I'm assuming this needs a table lock on AT_STATEMENT. If
so, what is the best way to do this? The way I'm doing it works only
in one specific instance, and seems to deadlock (or lock conflict) any
subsequent inserts/deletes from other places in the application (other
forms, other queries, etc.)
I know Delphi fairly well; but transaction processing is relatively
new to me.
Thanks in advance
Lane Campbell/OlGreyFox
------------------------------------
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links