ThreadSafe
database parameter
Description
Specifies whether your connection should take advantage of the
database server threadsafe client libraries.
By default, ThreadSafe is set to No to specify that your
connection does not use the threadsafe client libraries. If you set
ThreadSafe to Yes, your connection takes advantage of the threadsafe
client libraries.
When to specify ThreadSafe
You must specify a value for ThreadSafe before connecting to the
database.
Applies to
I10 Informix
IN9 Informix
O90 Oracle9i
O10 Oracle 10g
ORA Oracle (for 11g and later)
Syntax
|
1 |
ThreadSafe='value' |
|
Parameter |
Description |
|---|---|
|
value |
Specifies whether a connection uses the database
|
Default value
ThreadSafe=’No’
Usage
When to use
Oracle and Informix provide support for thread safety in their
client libraries. When you are using the Oracle or Informix database
interface to build multi-threaded applications in PowerBuilder, set the
ThreadSafe parameter to Yes to use threadsafe client libraries. This
prevents possible side effects among multiple threads of execution
making calls to the database server. Your application might incur a
performance penalty when you use the threadsafe client libraries.
By default, the client software (and, thus, PowerBuilder) assumes
that you are building an application in a single-threaded environment
that does not need the threadsafe client libraries. This default ensures
that single-threaded applications do not incur the performance penalty
associated with using threadsafe libraries. Therefore, if you are
building single-threaded applications, you can leave the ThreadSafe
parameter set to No (the default).
This parameter cannot be set dynamically. The value set when the
connection is made remains in effect until it is disconnected.
Examples
To specify that your connection uses the threadsafe client
libraries:
-
Database profile
Select the Thread Safe check box on the Connection page in the
Database Profile Setup dialog box. -
Application
Type the following in code:
1SQLCA.DBParm="ThreadSafe='Yes'"