Sign in Join
FPDoc Onlineexperiment

TSQLConnection class

In unit SQLDB

An abstract class representing a connection to a SQL Database.

Declaration

pascal
TSQLConnection = class(TDatabase)

Inheritance

  1. TSQLConnection
  2. TDatabase
  3. TCustomConnection
  4. TComponent
  5. TPersistent
  6. TObject

Descends from it: TIBConnection TMSSQLConnection TSQLConnector

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

Properties

Statementsprotected
PortprotectedPort the SQL engine is listening on.
CodePageprotected
ConnOptionspublicThe set of Connection options being used in the Connection.
HandlepublicLow level handle used by the connection.
FieldNameQuoteCharspublicCharacters used to quote field names.
PasswordpublishedPassword used when authenticating on the database server.
TransactionpublishedDefault transaction to be used for this connection.
UserNamepublishedThe username for authentication on the database server.
CharSetpublishedThe character set to be used in this database.
HostNamepublishedThe name of the host computer where the database resides.
LogEventspublishedFilter for events to log.
OptionspublishedOptions to observe for this connection.
RolepublishedRole in which the user is connecting to the database.
ConnectedpublishedIs a connection to the server active or not.
DatabaseNamepublishedThe name of the database to which connection is required.
KeepConnectionpublishedAttempt to keep the connection open once it is established.
LoginPromptpublishedShould SQLDB prompt for user credentials when a connection is activated.
ParamspublishedExtra connection parameters.

Methods

AddFieldToUpdateWherePartprotected
ConstructInsertSQLprotected
ConstructUpdateSQLprotected
ConstructDeleteSQLprotected
ConstructRefreshSQLprotected
CreateCustomQueryprotected
InitialiseUpdateStatementprotected
ApplyFieldUpdateprotected
ApplyRecUpdateprotected
RefreshLastInsertIDprotected
GetDBInfoprotected
PortParamNameprotected
GetConnectionCharSetprotected
SetTransactionprotected
DoConnectprotected
DoInternalConnectprotected
DoInternalDisconnectprotected
GetAsStringprotected
GetAsSQLTextprotected
GetHandleprotected
LogEventprotected
LogParamsprotected
Logprotected
RegisterStatementprotected
UnRegisterStatementprotected
UnPrepareStatementsprotected
AllocateCursorHandleprotected
DeAllocateCursorHandleprotected
StrToStatementTypeprotected
PrepareStatementprotected
UnPrepareStatementprotected
Executeprotected
RowsAffectedprotected
Fetchprotected
AddFieldDefsprotected
AddFieldDefprotected
LoadFieldprotected
LoadBlobIntoBufferprotected
FreeFldBuffersprotected
AllocateTransactionHandleprotected
GetTransactionHandleprotected
Commitprotected
RollBackprotected
StartImplicitTransactionprotected
StartDBTransactionprotected
CommitRetainingprotected
RollBackRetainingprotected
UpdateIndexDefsprotected
GetSchemaInfoSQLprotected
GetNextValueSQLprotected
MaybeConnectprotected
CreatepublicCreate a new instance of TSQLConnection.
DestroypublicDestroys the instance of the connection.
StartTransactionpublicStart the Transaction associated with this Connection.
EndTransactionpublicEnd the Transaction associated with this connection.
ExecuteDirectpublicExecute a piece of SQL code directly, using a Transaction if specified.
GetObjectNamespublicReturn a collection of object names for a given type of object.
HasTablepublic
GetTableNamespublicGet a list of the tables in the specified database.
GetProcedureNamespublicGets a list of Stored Procedures in the Database.
GetFieldNamespublicGets a list of the field names in the specified table.
GetSchemaNamespublicGet database schema names.
GetSequenceNamespublicReturn a list of sequence names.
GetConnectionInfopublicReturn some information about the connection.
GetStatementInfopublicGet statement information.
CreateDBpublicCreate a new Database on the server.
DropDBpublicProcedure to drop or remove a Database.
GetNextValuepublicGet next value for a sequence.

Events

OnLogpublishedEvent handler for logging events.
OnLoginpublishedEvent handler for login process.

Fields

FConnOptionsprotected
FSQLFormatSettingsprotected

Inherited

From TDatabase (12)

CheckConnected CheckDisConnected CloseDataSets CloseTransactions Directory DoDisconnect GetConnected GetDataset GetDataSetCount IsSQLBased TransactionCount Transactions

From TCustomConnection (20)

AfterConnect AfterDisconnect BeforeConnect BeforeDisconnect Close CloseForDestroy DataSetCount DataSets DoCloseError DoLoginPrompt ForcedClose GetLoginParams InternalHandleException Loaded OnCloseError Open SetConnected SetForcedClose SetLoginParams StreamedConnected

From TComponent (73)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.