[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sqldb' (#fcl)

TSQLConnector

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Universal connection component

Declaration

Source position: sqldb.pp line 715

type TSQLConnector = class(TSQLConnection)

published

  property ConnectorType: string; [rw]

  

Name of the connection type to use

end;

Inheritance

TSQLConnector

  

Universal connection component

|

TSQLConnection

  

An abstract class representing a connection to a SQL Database

|

TDatabase

  

Base class for connecting a FreePascal application to an external Database engine

|

TCustomConnection

  

Abstract class for connections to a server

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

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.

See also

TSQLConnector.ConnectorType

  

Name of the connection type to use

UniversalConnectors

  

Using the universal TSQLConnector type


Documentation generated on: Sep 28 2017