procedure TPDO.setAttribute (Attribute: TPDO_Attributes; AttributeValue: TPDO_Characteristics);
Sets an attribute on the database handle. To set then IPDOStatement attributes, refer to TPDOStatement.setAttribute.
Parameters
attribute: This is a characteristic defined by the TPDO_Attributes enumeration. Only a subset of the attributes available by TPDO.getAttribute can be set (The ones that don't return text).
- COLUMN_CASE
- ERRMODE
- EMPTY_STRINGS
- AUTOCOMMIT
- PREFETCH
- COMPRESSION
- MULTIQUERY
AttributeValue: For the attribute selected above, there are 2 or 3 values it can have, as defined by the TPDO_Characteristics enumeration.
- CASE_LOWER
- CASE_NATURAL
- CASE_UPPER
- ERRMODE_SILENT
- ERRMODE_WARNING
- ERRMODE_EXCEPTION
- NOT_NULL
- NULL_ORACLE
- AUTOCOMMIT_ON
- AUTOCOMMIT_OFF
- PREFETCH_ON
- PREFETCH_OFF
- COMPRESSION_ON
- COMPRESSION_OFF
- MULTIQUERY_ON
- MULTIQUERY_OFF
What these attributes do
- The "COLUMN_CASE" attribute reflects the PDO object setting to return the column names in all upper case, all lower case, or leave it as it is in the database
- The "ERRMODE" attribute reflects the PDO object setting to suppress any error messages from the DB, present them, or present them and raise an exception. Occasionally for very serious errors, an exception is raise regardless of this setting
- The "EMPTY_STRINGS" attribute reflects the PDO object setting of the format that empty strings are handled when selected.
- The "AUTOCOMMIT" attribute reflects whether the database automatically commits SQL queries or not.
- The "PREFETCH" attribute reflects the PDO object setting to prefetch the result set from the database and store it in the client, or just leave it on the server. The MySQL driver is set to prefetch by default, which is very common.
- The "COMPRESSION" attribute reflects the PDO object setting to compress the transmission stream. MySQL driver has this set to "COMPRESSION_ON" by default.
- The "MULTIQUERY" attribute reflects the PDO object setting to allow multiple statements in a single query. Mysql driver has this set to "MULTIQUERY_OFF" by default.