Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SQLDBC::SQLDBC_ConnectProperties Class Reference

List of all members.

Detailed Description

Specification of connection options.

Together with the command for opening a database session you can set several options. The following options are possible

OptionData TypeDescription
Internal Options
COMPNAME VARCHAR(64) The component name used to initialise the runtime environment. If it is a runtime library, the name must start with an "R". Otherwise the system considers it an application.
APPLICATION CHAR(3) The application to be connected to the database. Possible values are: CAL | CPC | CON | DOM | LOA | ODB | QUE | SQL | TPL| UTI| XCI.
APPVERSION NUMBER(5) Version of the application. This is computed: major * 10000 + minor * 100 + correction_level. E.g. version 7.6.00 has the version identifier "70600".
Database Behaviour
SQLMODE VARCHAR The SQL Mode. Possible values are: INTERNAL | ORACLE | ANSI | DB2 | SAPR3. The SAPR3 mode implies the following properties:
  • CACHE_ALL_STATEMENTS
  • SELECTFETCHOPTIMIZE
  • IGNORE_COLUMNNAMES
  • NUMBERS_WITHOUT_EXPONENT
  • MINGETVALSIZE
  • OPTIMIZEDSTREAMS (if not disabled explicitely)
UNICODE BOOLEAN TRUE | 1, the connection is an unicode (UCS2) client or FALSE | 0 it is an ASCII client.
CONNECTTYPE STRING The type of connection wanted. If not specified, the instance default is used. See also the description of the database parameter INSTANCE_TYPE The following values are accepted:
  • OLTP - The connection is an OLTP connection.
  • LVC - The connection is used for liveCache procedure calls.
TIMEOUT NUMBER The maximum allowed time of inactivity after which the connection to the database is closed by the system.
ISOLATIONLEVEL NUMBER The ISOLATION LEVEL specifies whether and how shared locks and exclusive locks are implicitly requested or released. For possible values see: setTransactionIsolation()
KEY STRING The XUSER key to use for the connect to the database.
SPACE_OPTION BOOLEAN Whether character values contain at least 1 blank, or are NULL.
Performance and Optimization Options
PACKETCOUNT NUMBER | STRING The number of different request packets used for the connection. Enter a positive number or UNLIMITED for an unlimited number of request packets
STATEMENTCACHESIZE NUMBER | STRING The number of prepared statements to be cached for the connection for re-use. Possible values are: <n>: desired number of statements 0: no statements are cached UNLIMITED: unlimited number of statements is cached. The default value for STATEMENTCACHESIZE is 1000.
CACHE_ALL_STATEMENTS BOOLEAN When used, the information for all kinds of prepared statements are cached. Otherwise, only statements that had no parameters bound when they were prepared are cached, as bound parameters may change the semantics of the statement.
SELECTFETCHOPTIMIZE INTEGER When the option has the value 1, the first rows of the result set are transferred to the client already on the execute to save one fetch command.
VARIABLEINPUT BOOLEAN If set, the new protocol to transmit statement parameters which has no space-padded data values is used, if the database kernel supports it.
OPTIMIZEDSTREAMS BOOLEAN If set, the stream handling for stored procedures that sends data for more than stream is enabled.
Compatibility Options
CURSORPREFIX STRING The prefix to use for result tables that are automatically named.
TRANSLATE_BINARY_AS_ENCODED BOOLEAN Enables the conversion from raw bytes to encoded character types (ASCII or UNICODE). If not set, the conversion between binary values and character types is not permitted. The conversion performed is only a copy of the binary values from the application.
CHOPBLANKS BOOLEAN When used, trailing blanks are removed also from CHAR columns.
DROPPARSEIDDIRECT BOOLEAN When used, parse ids of unused commands are dropped immediately.
CODEPAGENAME STRING The name of the codepage that has to be loaded from the built-in codepages or the database kernel codepage table. The following codepages are supported:
  • ISO-8859-1 (Latin 1)
  • ISO-8859-2 (Latin 2)
  • ISO-8859-3 (Latin 3)
  • ISO-8859-4 (Baltic)
  • ISO-8859-5 (Cyrillic)
  • ISO-8859-6 (Arabic)
  • ISO-8859-7 (Greek)
  • ISO-8859-8 (Hebrew)
  • ISO-8859-9 (Turkish)
  • ISO-8859-10 (Nordic)
  • ISO-8859-11 (Thai)
  • ISO-8859-13 (Baltic Rim)
  • ISO-8859-14 (Celtic)
  • ISO-8859-15 (Latin 9)
  • ISO-8859-16 (South-Eastern European)
  • WINDOWS-874 (Thai)
  • WINDOWS-932 (Japanese Shift-JIS)
  • WINDOWS-936 (Simplified Chinese GBK)
  • WINDOWS-949 (Korean)
  • WINDOWS-950 (Traditional Chinese Big5)
  • WINDOWS-1250 (Central Europe)
  • WINDOWS-1251 (Cyrillic)
  • WINDOWS-1252 (Latin 1)
  • WINDOWS-1253 (Greek)
  • WINDOWS-1254 (Turkish)
  • WINDOWS-1255 (Hebrew)
  • WINDOWS-1256 (Arabic)
  • WINDOWS-1257 (Baltic)
DEFAULTMAPCHAR CHAR The character representing non-convertible UCS2 characters in ASCII strings. This property only works if property CODEPAGENAME is set. If this property is not set, a non-convertible UCS2 character causes an conversion error when converting to ASCII. Setting DEFAULTMAPCHAR to '' disables this feature (this setting is the default).
SERVERPROGRAM STRING The name of the server program to communicate with. Using the SQLDBC client, you may also communicate with another server program than the database, such as the Loader, or the Database Manager. To communicate with the Loader, you should set this property to "LOADER", to use the database manager, set the property to "DBM", otherwise use the name of the server executable program.

Note:
Possible values for BOOLEAN options are 'true', 'false', 'yes', 'no', '0', '1'.

The options and the values are case insensitive.

Definition at line 3293 of file SQLDBC.h.

Public Member Functions


Constructor & Destructor Documentation

SQLDBC::SQLDBC_ConnectProperties::SQLDBC_ConnectProperties  ) 
 

Creates an empty set of options.

A default allocator is used.

SQLDBC::SQLDBC_ConnectProperties::SQLDBC_ConnectProperties const SQLDBC_ConnectProperties copy  ) 
 

The copy constructor.

Parameters:
copy The options be copied.

SQLDBC::SQLDBC_ConnectProperties::SQLDBC_ConnectProperties SAPDBMem_IRawAllocator &  allocator  ) 
 

SQLDBC::SQLDBC_ConnectProperties::~SQLDBC_ConnectProperties  ) 
 

The destructor.


Member Function Documentation

const char* SQLDBC::SQLDBC_ConnectProperties::getProperty const char *  key,
const char *  defaultvalue = 0
const
 

Retrieves an option.

Parameters:
key The option key to be requested
defaultvalue The value to be returned. If the option is not found the default value is returned.
Returns:
The value found in the options set, or the default value specified.

void SQLDBC::SQLDBC_ConnectProperties::setProperty const char *  key,
const char *  value
 

Sets an option.

Parameters:
key The option to be set (ASCII string)
value The option value to be set (ASCII string)