Главная страница | назад





Article #15426: TProvider Component vs. Provider Property

 Question and Answer Database

FAQ426D.txt   TProvider Component vs. Provider Property
Category   :DCOM/MultiTier/ActiveForm
Platform    :All
Product    :Delphi 3.x  

Question:
What is the purpose of the TProvider component vs. the
Provider property of the dataset?  When would the
TProvider component be necessary?

Answer:
The Provider property of the dataset is an interface of
type IProvider.  A TProvider is not required, you can just
use DataSet.Provider. Look at TDBDataSet.GetProvider for
how it gets the IProvider.  TProvider is useful, if you
need any of the events.

This example will open a client dataset looking at a TTable
on the same form.

?
uses BDEProv; ... procedure Button1Click(Sender: TObject); begin ClientDataSet1.Provider := Table1.Provider; ClientDataSet1.Open; end; ?
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99