[ Pobierz całość w formacie PDF ]
.Drop a TDatabase component; point its AliasName property to IBLocal, and itsDatabaseName property to IBL (this is just the name that we will use in ourapplication).2.Drop a TTable component, point its DatabaseName property to IBL (which pointsto the Database component from the previous step).3.Open the drop-down combo box for the TableName property and select theCUSTOMER table.This will pop-up the Database Login dialog with usernamesysdba.The password is masterkey.4.Drop a TDataSource component; point its DataSet property to the TTablecomponent.5.Drop a TDBNavigator component; point its DataSource property to theTDataSource component.6.Drop a TDBGrid component; point its DataSource property to the TDataSourcecomponent.7.Set the Table, Active property to true to see the live data at design time.Using dbExpress to Build an ApplicationUsing dbExpress instead of the BDE, the steps to build an application using theInterBase CUSTOMER table are as follows (again starting with a new application):1.Drop a TSQLConnection component, and select IBLocal as the value for itsConnectionName property (edit the Connection Properties to make sure theDatabase points to a valid InterBase database).2.Drop a TSQLClientDataSet component, point its DBConnection property to theTSQLConnection component and set CommandType to ctTable (we want to select atablename). 15 0672324806 CH12 12/12/02 2:41 PM Page 466466 CHAPTER 12 Data Access with dbExpress3.Open the drop-down combo box for the CommandText property and select theCUSTOMER table.This will pop-up the Database Login dialog with usernamesysdba.The password is masterkey.4.Drop a TDataSource component; point its DataSet property to theT(SQL)ClientDataSet component.5.Drop a TDBNavigator component; point its DataSource property to theTDataSource component.6.Drop a TDBGrid component; point its DataSource property to the TDataSourcecomponent.7.Set the (SQL)ClientDataSet, Active property to true to see the live data atdesign time.The second and third steps can be replaced with the following four steps (replacingthe TSQLClientDataSet with the TSQLDataSet, TDataSetProvider, and TClientDataSetcombination):1.Drop a TSQLTable component; point its SQLConnection property to theTSQLConnection component.2.Select a TableName (such as CUSTOMER).3.Drop a TDataSetProvider component; point its DataSet property to the TSQLTablecomponent.4.Drop a TClientDataSet component, point its ProviderName property to theTDataSetProvider component.SummaryIn this chapter, we have examined the cross-platform data access layer dbExpress,which consists of new, fast, and unidirectional DataSet components that can beconnected to ClientDataSets for caching and bidirectional cursor support.Especiallynow that development and support of the BDE has been frozen and SQL Links willeven be deprecated in future versions of C++Builder, leads to the conclusion thatdbExpress will play an important role for data access with C++Builder. 16 0672324806 CH13 12/12/02 2:38 PM Page 46713 IN THIS CHAPTER" XML DocumentXML Document Programming" XML Data BindingProgramming and XML" XML Mapping ToolMapperby Bob Swart (a.k.a.Dr.Bob)In this chapter, we will cover XML DocumentProgramming using the TXMLDocument component.Thecapabilities from the TXMLDocument component will then beenhanced using XML Data Binding and even further usingthe XML Mapping Tool.All these techniques are part ofthe BizSnap featureset of C++Builder 6 Enterprise, whichalso includes support for SOAP and Web Services (seeChapter 19,  SOAP and Web Services with BizSnap, forcoverage of those BizSnap features).XML Document ProgrammingThe place to start the coverage of XML DocumentProgramming in C++Builder 6 is the TXMLDocument compo-nent, which can be found on the Internet tab of theComponent Palette.But, before we can actually start to usethis component, we first need an actual XML document towork with.While writing this chapter for the C++Builder 6Developer s Guide, I decided to write my own XML docu-ment, which reflects the structure of this chapter (it alsohelped me to focus on the topics to write about).The XMLdocument that will be used throughout the entire chapteris stored in BizSnap.xml and defined as follows:rage of XMLDocument Programming in C++Builder 6 is the 16 0672324806 CH13 12/12/02 2:38 PM Page 468468 CHAPTER 13 XML Document Programming and XML MapperTXMLDocumentTXMLDocumentXML Data Binding WizardTXMLDocument, TXMLTransform, TXMLTransformProvider, TXMLTransform¥'ClientXML MapperAs you can see, the chapter is divided into three sections [ Pobierz caÅ‚ość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • funlifepok.htw.pl
  •