DBParm parameters in Database


The following DBParm parameters are supported: CommitOnDisconnect, CacheName, DelimitIdentifier, DateTimeAllowed, DisableBind, NCharBind, TrimSpaces and Identity.

  1. The data source name for the CacheName parameter is case sensitive in JBoss, JEUS, WebLogic and WebSphere (but not in .NET IIS).

  2. DisableBind parameter is only supported in ESQL.

  3. In PowerServer, the data source specified applies for the connection of the deployed application to the database. Settings to the other parameters in the script will be ignored.

  4. To support DelimitIdentifier parameter, you must set the "Enclose table and column names in double quotes" option in the PowerServer Toolkit | DB Type Profile Configuration page before deployment.

  5. If table and column names are keywords that must be enclosed in double quotation marks (with DelimitIdentifier set to "yes"), the SQL statement cannot be a PowerBuilder SELECT statement, otherwise, PDF Print and Save As PDF will fail.

  6. The DelimitIdentifier parameter is unsupported when the updated table name of DataWindow contains the owner name. In this case, be sure to clear the "Enclose table and column names in double quotes" check box in PowerServer Toolkit.

  7. It is unsupported to dynamically set the DelimitIdentifier parameter. For all supported DBParm parameters (excluding DelimitIdentifier) you can only dynamically set them before executing Connect.

  8. Supports the Identity property of Transaction DBParm, for example: Identity='@@IDENTITY'.

  9. NCharBind parameter is only supported in MS SQL Server. In PowerBuilder, NCharBind is effective only when DisableBind = 0; in PowerServer, NCharBind is effective regardless of the value of DisableBind.


Except the parameters above, other DBParm parameters are unsupported.

Parameter added by PowerServer

The Transactionname parameter is added by PowerServer to take care of the limitation in which if transaction objects are called with the object name and instance name for example parentname.instancename, PowerServer can only get the instance name rather than the object name as well as the instance name; this will cause a problem for PowerServer if two transaction objects are called with the same instance name, as PowerServer cannot differentiate the instance name by their parent object, and unlike PowerBuilder which can get the precise transaction object name via SetTransObject function, PowerServer requires the precise transaction object name as soon as the ConnectString function is called (which is before SetTransObject function is called). To work around this limitation, you can set the precise transaction object name using the Transactionname parameter, for example, Transactionname="in_1.intr_pool", so that PowerServer knows the precise transaction object name when the ConnectString function is called.

In the following example, userobject1 and userobject2 have the same instance name "intr_pool". Unlike PowerBuilder which gets the exact name (userobject1.intr_pool or userobject2.intr_pool) from the SetTransObject function, PowerServer can only get "intr_pool" as the transaction object name and will be confused of which transaction object to call. To resolve this confusion, we can specify the precise transaction object name via the Transactionname parameter so that PowerServer clearly knows which transaction object to use to establish the database connection.

Unsupported code:

n_tr intr_pool //Instance variables
public function integer of_transaction (string as_dbparm);
intr_pool.DBMS = "MSS"
intr_pool.LogPass = "appeon"
intr_pool.LogId = "sa"
intr_pool.AutoCommit = False
intr_pool.DBParm = "PROVIDER='SQLOLEDB', DATASOURCE='', PROVIDERSTRING='database=en_sql2000', CacheName = '"+as_dbparm+ "'"
Connect using intr_pool;
end function

userobject1.of_transaction ("ASATEST")
dw_1.settransobject (userobject1.intr_pool)
userobject2.of_transaction ("ASATEST")
dw_2.settransobject (userobject2.intr_pool)

Modified code:

intr_pool.DBParm = "PROVIDER='SQLOLEDB', DATASOURCE='', PROVIDERSTRING='database=en_sql2000', CacheName = '"+as_dbparm+ "', Transactionname = '"+as_dbtransactionname+ "'"