Pascal Data Objects

function TPDO.getAttribute (Attribute: TPDO_Attributes; var TextInformation: AnsiString): TPDO_Characteristics;

This function returns the value of a database connection attribute. To retrieve IPDOStatement attributes, refer to TPDOStatement.getAttribute.

Parameters

attribute: This is a characteristic defined by the TPDO_Attributes enumeration

  • COLUMN_CASE
  • ERRMODE
  • EMPTY_STRINGS
  • AUTOCOMMIT
  • PREFETCH
  • CONNECTION_STATUS
  • COMPRESSION
  • DRIVER_NAME
  • CLIENT_INFO
  • CLIENT_VERSION
  • SERVER_INFO
  • SERVER_VERSION
  • MAX_BLOB_SIZE
  • MULTIQUERY

text information: One characteristic, "TEXTINFO" is returned for attributes that can't be enumerated. The text data associated with this characteristic passes through this parameter.

Return Values

An enumeration of TPDO_Characteristics is returned:

  • 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
  • CONNECTED
  • UNCONNECTED
  • MULTIQUERY_ON
  • MULTIQUERY_OFF
  • TEXTINFO
  • XUNIMPLEMENTED,

What these attributes do

  1. 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
  2. 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
  3. The "EMPTY_STRINGS" attribute reflects the PDO object setting of the format that empty strings are handled when selected.
  4. The "AUTOCOMMIT" attribute reflects whether the database automatically commits SQL queries or not.
  5. 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.
  6. The "COMPRESSION" attribute reflects the PDO object setting to compress the transmission stream. MySQL driver has this set to "COMPRESSION_ON" by default.
  7. The "CONNECTION_STATUS" attribute reflects whether the database is currently connected to the TPDO object or not.
  8. The "DRIVER_NAME" attribute returns text on the database and protocol used in the last connection attempt.
  9. The "CLIENT_INFO" attribute returns text on the database client used for the current connection.
  10. The "CLIENT_VERSION" attribute returns text on the database client library version used for the current connection.
  11. The "SERVER_INFO" attribute returns text on the database server used for the current connection.
  12. The "SERVER_VERSION" attribute returns text on the database server version used for the current connection.
  13. The "MAX_BLOB_SIZE" attribute returns numeric text indicating the current setting for the maximum BLOB size for text variable bindings.
  14. 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.