[ic] Database Connection Concurrency/Exclusivity

Todd L. Cawthron todd at lunsfordgroup.com
Tue Oct 28 10:19:41 EST 2003

> > If I went the multiple query route, I would begin a transaction, run a
> > delete query, then a number of insert queries, and finally commit the
> > transaction. If I do this with a number of calls to the query tag (or by
> > using the underlying database handle directly), will I have any problems
> > running in pre-fork mode? In other words, will the interchange process
> > is running this subroutine always use the same database handle for each
> > and will it have exclusive use of this handle? Or, will other
> > processes potentially issue database commands using the same database
> > connection, which might result in queries being unintentionally included
> > my transaction?
> This should not be a problem. Unless you specify that the table is
> HOT, which is not the default, the same handle will not be used.
> You *will* have to specify
> Database foo  HAS_TRANSACTIONS  1
> as we don't do that for Sybase.
> The rest should be just like in the other ones:
> [flag type=transactions table=foo]
> [query sql="insert into foo values (...)"]
> [query sql="update foo set ..."]
> [flag type=commit table=foo]
> The flag for transactions should always be in ITL, not in embedded
> perl. The rest can be in either.


Thanks for your response. I just want to make sure I'm clear on a couple of

This is what I understand from your reply: First, defining a database/table
with HAS_TRANSACTIONS 1 only alerts ic to the fact that the db is capable of
using transactions and doesn't require that I explicitly use transactions
every time I want to insert/update/delete. I can select to use transactions
by using the flag tag as above when I need to use them.

If I'm using multiple tables in the same database (multiple tables defined
with identical DSNs), does this flag only affect the database handle
associated with the specified table, or does it affect all handles to all
tables within the same database?

Finally, what does HOT do in the database sense? I read about hot for the
Document object, but am not sure what it does for databases.


More information about the interchange-users mailing list