I want to write a component that takes a TADOConnection and returns a TADODataset. The component will hide all the database access from the coders. See the code below.
This component (TDBPlatform) will return a dataset of all the users in the system but because I want to hide the sql and tables from the coders I would like to do it in a component.
My question is how do I make the TDataset property (Users) visible to any TDatasource component I drop on my form?
At the moment I do not seem to be able to assign the Users property to my TDatasource component. Its not availble in the list of datasets. Is it possible? I want to be able to link my TDBPlatform component and TDatasource component at design time.
TDBPlatform = class( TComponent )
... some code ...
property ADOConnection : TADOConnection read FADOConnection write SetADOConnection;
property Users: TADODataSet read FUsers ;
constructor Create( AOwner: TComponent ); override ;