EPUB | CHM | PDF

TMySQLDatabase.Properties.ConnectOptions

Top Previous Next

Sets DB connection parameters.

Syntax:

property ConnectOptions: TConnectOptions;
type
TConnectOption = (coCompress,
                  coFoundRows,
                  coIgnoreSpaces,
                  coInteractive,
                  coNoSchema,
                  coODBC,
                  coSSL);
TConnectOptions = set of TConnectOption;

Description:

The value of ConnectOptions is usually empty set [], but it can be set to a combination of the following flags in very special circumstances:

coCompress

Use compression protocol.

coFoundRows

Return the number of found (matched) rows, not the number of affected rows.

coIgnoreSpaces

Allow spaces after function names. Makes all functions names reserved words.

coNoSchema

Don't allow the db_name.tbl_name.col_name syntax. This is intended for ODBC only: it causes the parser to generate an error if you use that syntax, that is useful for trapping bugs in some ODBC programs.

coODBC

The client is an ODBC client.

coInteractive

Allow interactive_timeout seconds (instead of wait_timeout seconds) of inactivity before closing the connection.

coSSL

Use SSL (encrypted protocol).

Example of usage:

Use the following code to enable SSL usage at run-time:

mySQLDatabase1.ConnectOptions := mySQLDatabase1.ConnectOptions + [coSSL];

Don't forget to add MySQLTypes to your uses section.

See also: SSLCert, SSLKey, IsSSLUsed properties