Skip to content

TSQLConnector

Universal connection component.

Declaration

Source position: sqldb.pp line 782

type

  TSQLConnector = class(TSQLConnection)
  published
    property ConnectorType: string; {rw}
    property Port;
  end;

Description

TSQLConnector implements a general connection type. When switching database backends, the normal procedure is to replace one instance of TSQLConnection descendent with another, and connect all instances of TSQLQuery and TSQLTransaction to the new connection.

Using TSQLConnector avoids this: the type of connection can be set using the ConnectorType property, which is a string property. The TSQLConnector class will (in the background) create the correct TSQLConnection descendent to handle all actual operations on the database.

In all other respects, TSQLConnector acts like a regular TSQLConnection instance. Since no access to the actually used TSQLConnection descendent is available, connection-specific calls are not available.

Properties

Member Visibility Description
ConnectorType published Name of the connection type to use.
Port read only published
See all Properties

See also

Name Description
TSQLConnector.ConnectorType Name of the connection type to use.
UniversalConnectors Using the universal TSQLConnector type.