[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Universal connection component
Source position: sqldb.pp line 762
type TSQLConnector = class(TSQLConnection) |
||
published |
||
property ConnectorType: string; [rw] |
|
Name of the connection type to use |
end; |
|
Universal connection component |
|
| | ||
|
An abstract class representing a connection to a SQL Database |
|
| | ||
|
Base class for connecting a FreePascal application to an external Database engine |
|
| | ||
|
Abstract class for connections to a server |
|
| | ||
| | ||
| | ||
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.
|
Name of the connection type to use |
|
|
Using the universal TSQLConnector type |