ALLBASE/SQL Reference Manual (36216-90216)

Chapter 2 95
Using ALLBASE/SQL
Using Multiple Connections and Transactions with Timeouts
:PartNameInd
When host variables are used in an application outside of an embedded SQL statement,
the host variable name is
not
prefixed by a colon.
Multiple-Row Manipulations
Programmatic SELECTs and INSERTs can operate only on a row at a time unless you use a
cursor or the BULK option of the SELECT, INSERT, or FETCH statement.
A cursor is a pointer that you advance one row at a time. The BULK option is used to
manipulate multiple rows with a
single
execution of the SELECT, INSERT, or FETCH
statements. When you do bulk manipulations, input and output host variables must be
arrays.
Using Multiple Connections and Transactions with
Timeouts
A maximum of 32 simultaneous database environment connections can be established by
means of an application program or ISQL. When accessing more than one
DBEnvironment, there is no need to release one before connecting to another. Performance
is greatly improved using this method rather than connecting to and releasing each
DBEnvironment sequentially.
This multi-connect functionality is available in either of two modes. Single-transaction
mode (the default) is standards compliant and allows one transaction at a time to be active
across the currently connected set of DBEnvironments. Multi-transaction mode can be set
to allow multiple, simultaneous transactions across the currently connected set of
DBEnvironments.
Both local and remote DBEnvironments are accessible via multi-connect functionality.
Remote connections require the installation of ALLBASE/NET on the client and on each
related server.
The following sections discuss how to use multi-connect features:
Connecting to DBEnvironments
Setting the Current Connection
Setting Timeout Values
Setting the Transaction Mode
Disconnecting from DBEnvironments
The sample DBEnvironment, PartsDBE, and three hypothetical DBEnvironments,
SalesDBE, AccountingDBE, and BankDBE are used to provide examples in this section.
The ALLBASE/SQL Advanced Application Programming Guide contains further
application programming information regarding multi-connect functionality.)