TDatabase class
Base class for connecting a FreePascal application to an external Database engine.
Declaration
TDatabase = class(TCustomConnection)Inheritance
Descends from it: TSQLConnection
Description
TDatabase is a component whose purpose is to provide a connection to an external database engine, not to provide the database itself.
This class provides generic methods for attachment to databases and querying their contents; the details of the actual connection are handled by
database-specific components (such as SQLDb for SQL-based databases, or DBA for DBASE/FoxPro style databases).
Like TDataset, TDatabase is an abstract class. It provides methods to keep track of datasets connected to the database, and to close these datasets when the connection to the database is closed. To this end, it introduces a Connected boolean property, which indicates whether a connection to the database is established or not. The actual logic to establish a connection to a database must be implemented by descendent classes.
See also
Properties
TransactionCount | public | Number of transaction components connected to this database. |
Transactions | public | Indexed access to all transaction components connected to this database. |
Directory | public | Directory for the database. |
IsSQLBased | public | Is the database SQL based. |
Connected | published | Is the database connected. |
DatabaseName | published | Database name or path. |
KeepConnection | published | Should the connection be kept active. |
Params | published | Connection parameters. |
Methods
CheckConnected | protected | |
CheckDisConnected | protected | |
DoConnect | protected | |
DoDisconnect | protected | |
GetConnected | protected | |
GetDataset | protected | |
GetDataSetCount | protected | |
DoInternalConnect | protected | |
DoInternalDisConnect | protected | |
Create | public | Initialize a new TDatabase class instance. |
Destroy | public | Remove a TDatabase instance from memory. |
CloseDataSets | public | Close all connected datasets. |
CloseTransactions | public | End all transactions. |
StartTransaction | public | Start a new transaction. |
EndTransaction | public | End an active transaction. |
Inherited
From TCustomConnection (22)
AfterConnect AfterDisconnect BeforeConnect BeforeDisconnect Close CloseForDestroy DataSetCount DataSets DoCloseError DoLoginPrompt ForcedClose GetLoginParams InternalHandleException Loaded LoginPrompt OnCloseError OnLogin 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.
