[View Borland Home Page][View Product List][Search This Web Site][View Available Downloads][Join Borland Online][Enter Discussion Area][Send Email To Webmaster]
Delphi Devsupport

Frequently Asked Questions

TProvider Component vs. Provider Property

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;

Back To Faq Index
Borland Online
Trademarks & Copyright © 1997 Borland International, Inc.