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
- 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 "CONNECTION_STATUS" attribute reflects whether the database is currently connected to the TPDO object or not.
- The "DRIVER_NAME" attribute returns text on the database and protocol used in the last connection attempt.
- The "CLIENT_INFO" attribute returns text on the database client used for the current connection.
- The "CLIENT_VERSION" attribute returns text on the database client library version used for the current connection.
- The "SERVER_INFO" attribute returns text on the database server used for the current connection.
- The "SERVER_VERSION" attribute returns text on the database server version used for the current connection.
- The "MAX_BLOB_SIZE" attribute returns numeric text indicating the current setting for the maximum BLOB size for text variable bindings.
- 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.