[ic] Database Connection Concurrency/Exclusivity

Todd L. Cawthron todd at lunsfordgroup.com
Mon Oct 27 14:26:28 EST 2003

I'm running Interchange using a SQL database (Sybase to be exact). Recently,
I ran into a situation where I wanted to use a transaction when deleting and
then inserting rows into a table.

I could stitch together a batch of SQL statements and send the batch as a
single query, or I could use multiple queries. The batch would probably be
the safest route, although it could be a problem if the batch was really

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 that
is running this subroutine always use the same database handle for each call
and will it have exclusive use of this handle? Or, will other interchange
processes potentially issue database commands using the same database
connection, which might result in queries being unintentionally included in
my transaction?

Any pointers on how interchange manages database connections would be
greatly appreciated.


More information about the interchange-users mailing list