Sign in Join
FPDoc Onlineexperiment

TDataSource class

In unit DB

Component representing the link between a local (GUI) component and a dataset.

Declaration

pascal
TDataSource = class(TComponent)

Inheritance

  1. TDataSource
  2. TComponent
  3. TPersistent
  4. TObject

Description

TDatasource is a mediating component: it handles communication between any DB-Aware component (often edit controls on a form) and a TDataset instance. Any database aware component should never communicate with a dataset directly. Instead, it should communicate with a TDatasource instance. The TDataset instance will communicate with the TDatasource instance, which will notify every component attached to it. Vice versa, any component that wishes to make changes to the dataset, will notify the TDatasource instance, which will then (if needed) notify the TDataset instance. The datasource can be disabled, in which case all communication between the dataset and the DB-AWare components is suspended until the datasource is again enabled.

See also

Properties

DataLinksprotected
DataLinkprotected
DataLinkCountprotected
StatepublicState of the dataset.
AutoEditpublishedShould the dataset be put in edit mode automatically.
DataSetpublishedDataset this datasource is connected to.
EnabledpublishedEnable or disable sending of events.

Methods

DoDataChangeprotected
DoStateChangeprotected
DoUpdateDataprotected
CreatepublicCreate a new instance of TDatasource.
DestroypublicRemove a TDatasource instance from memory.
EditpublicPut the dataset in edit mode, if needed.
IsLinkedTopublicCheck if a dataset is linked to a certain dataset.

Events

OnStateChangepublishedCalled whenever the state of the dataset changes.
OnDataChangepublishedCalled whenever data changes in the current record.
OnUpdateDatapublishedCalled whenever the data in the dataset must be updated.

Inherited

From TComponent (74)

_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 Loaded 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.