Subject Re: [firebird-support] Urgent help needed: application locks with > 1 user
Author Helen Borrie
At 05:05 PM 23/10/2006, you wrote:
>I have the following problem:
>I made an application which uses a FireBird database. The database
>(SuperServer 1.5) runs on a pc. I have two clients connecting to
>this database. Both clients use the same database user (which I
>setup in the ODBC Administrator).
>I thougt I was finished developing and began testing the
>application. What happens is this:
>Client 1 opens a window on which data is shown. When I open the same
>window on client 2 with another record, the window doesn't show the
>data. It looks like it's waiting. Even when I close the window on
>client 1, client 2 is still 'waiting'. Only when I quit the
>application on client 1, client 2 suddenly shows the data.
>I'm quite a newbie with FireBird. I tried searching for the reason,
>but 'didn't find the solution or a post in which the same problem is
>Is this what they call a deadlock?

No. Deadlocks (and other lock conflicts) occur when two transactions
attempt to update (or delete) the same record. You will get an
exception message telling you what kind of conflict it is.

>The query I use is just a select (with noting about locks in it).
>Is this problem known?

Are you getting any exception messages at all?

If you really are not updating or deleting anything, look at the
isolation level of your transaction. If it is Consistency (a.k.a.
SNAPSHOT TABLE STABILITY), then this is an exclusive, table-wide
isolation level for a read/write transaction and is rarely if ever
used. What you want is either concurrency (a.k.a. SNAPSHOT) or Read
Committed. Neither of those will block each other when reading.

You might also ask on the firebird-odbc-devel list whether your ODBC
configuration is right for what you want to do.

If you wish to do that, and/or to continue this thread here, then you
need to provide more information than you have so far. For example,
provide the connection string that the client application is using
and say whether both clients are on separate machines to the one
where the server is running.