Subject Problems in a multiuser environment
Author mss@smart.net
Hello Community,

I have been working with Interbase and Delpi's IBX controls for a few
months in a single-user development environment. I previously
thought that the IBX controls handled much of the transaction
processing for me. I am currently hoping to find appropriate
documentation to strengthen my understanding.

The following example illustrates the problem I am having moving my
application to a multi-user environment:

The protocol is TCP/IP.

I begin a new project. I place one IBDatabase, one IBTransaction,
and one IBTable control on the new form. I also add a button. I set
the DefaultAction property of the IBTransaction control
to "CommitRetaining". I hook up the controls and I set the proper
path to the Interbase database.

I started with the following button logic:

Table1.Active := TRUE;
Table1.Edit;

if Table1['field1'] = '1' then Table1['field1'] := '2' else
Table1['field1'] := '1';

Table1.Post;

This application doesn't work using multiple work stations.
The "Table1.Post" causes one of the work stations to "hang up"
because a transaction is open.

The transaction is automatically started by Delphi. Next I tried
adding the following line after Table1.Post:

IBTransaction1.Commit;

This solves the multi-user conflict but it creates a far worse
problem by closing Table1. So now the application is unusable even
on a single work station. So next I tried this:

IBTransaction1.CommitRetaining;

This allows Table1 to stay open but one again the application will
not work in a multi-user environment. One of the stations receives
the following error message:

deadlock
Update conflicts with concurrent update.

What would it take to make this simple application work in a multi-
application environment? Also, can you recommend documentation that
would help me?

Thank you!

- Dale F.