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

TSQLConnection

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

An abstract class representing a connection to a SQL Database

Declaration

Source position: sqldb.pp line 87

type TSQLConnection = class(TDatabase)

public

  Handle: Pointer;

  

Low level handle used by the connection.

  FieldNameQuoteChars: TQuoteChars;

  

Characters used to quote field names.

  constructor Create(); override;

  

Create a new instance of TSQLConnection

  destructor Destroy; override;

  

Destroys the instance of the connection.

  procedure StartTransaction; override;

  

Start the Transaction associated with this Connection

  procedure EndTransaction; override;

  

End the Transaction associated with this connection

  ConnOptions: TConnOptions;

  

The set of Connection options being used in the Connection

  procedure ExecuteDirect();

  

Execute a piece of SQL code directly, using a Transaction if specified

  procedure GetTableNames(); virtual;

  

Get a list of the tables in the specified database

  procedure GetProcedureNames(); virtual;

  

Gets a list of Stored Procedures in the Database

  procedure GetFieldNames(); virtual;

  

Gets a list of the field names in the specified table

  procedure CreateDB; virtual;

  

Create a new Database on the server

  procedure DropDB; virtual;

  

Procedure to drop or remove a Database

published

  Password: ;

  

Password used when authenticating on the database server

  Transaction: TSQLTransaction;

  

Default transaction to be used for this connection

  UserName: ;

  

The username for authentication on the database server

  CharSet: ;

  

The character set to be used in this database

  HostName: ;

  

The name of the host computer where the database resides

  OnLog: TDBLogNotifyEvent;

  

Event handler for logging events

  LogEvents: TDBEventTypes;

  

Filter for events to log

  Connected: <NIL>;

  

Is a connection to the server active or not

  Role: ;

  

Role in which the user is connecting to the database

  DatabaseName: <NIL>;

  

The name of the database to which connection is required.

  KeepConnection: <NIL>;

  

Attempt to keep the connection open once it is established.

  LoginPrompt: <NIL>;

  

Should SQLDB prompt for user credentials when a connection is activated.

  Params: <NIL>;

  

Extra connection parameters

  OnLogin: <NIL>;

  

Event handler for login process

end;

Inheritance

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

TSQLConnection is an abstract class for making a connection to a SQL Database. This class will never be instantiated directly, for each database type a descendent class specific for this database type must be created.

Most of common properties to SQL databases are implemented in this class.

See also

TSQLQuery

  

Class to handle SQL commands (with or without result set)

TSQLTransaction

  

Transaction in which a TSQLQuery is handled


Documentation generated on: Feb 02 2013