1 / 24

Advantage .NET Data Provider

Advantage .NET Data Provider. agenda. ADO.NET Overview Advantage .NET Data Provider Advantage Specific Functionality. ADO.NET architecture. ADO.NET objects. Connection – Connects to the data source DataAdapter – Connects through OConnection and populates DataSet

petra
Download Presentation

Advantage .NET Data Provider

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advantage .NET Data Provider

  2. agenda • ADO.NET Overview • Advantage .NET Data Provider • Advantage Specific Functionality

  3. ADO.NET architecture

  4. ADO.NET objects • Connection – Connects to the data source • DataAdapter – Connects through OConnection and populates DataSet • Command – Executes SQL or stored procedures against datasource • DataReader – Provides read-only connections to datastore

  5. data adapter • Data Adapter fills DataSet by using built-in Command Objects • SelectCommand • DeleteCommand • UpdateCommand • InsertCommand • Data Adapter’s update method flushes changes to datasource via Delete, Update and Insert Commands

  6. data reader • DataReader object automatically holds results from a Data Command • DataReader object returns a read-only, forward-only stream of data from a DataCommand. Only a single row of data is in-memory at a time.

  7. dataset architecture

  8. dataset • Miniature Database • Made up of tables and relationships between tables • Set up constraints and referential integrity • DataSets are disconnected • Other users may change underlying data • DataSets have no recognition of changes

  9. datatable • A single table within a dataset • Contains all table data and schema • Constraint collection • Foreign Key • Unique

  10. Advantage .NET Data Provider

  11. connection string • Free table connection AdsConnection conn = new AdsConnection( "data source=C:\\data;ServerType=remote |local; TableType=ADT" ); • Data Dictionary connection AdsConnection conn = new AdsConnection( "data source=C:\\data\mydictionary.add;ServerType=remote|local;User ID=chrisf ;Password=password"); • Reminder: ADSSYS account for data dictionary Administration only

  12. Advantage specific options • Server Type • Table Type • Encryption Password • TrimTrailingSpaces • Compression • CharType • LockMode • SecurityMode

  13. quick start* • Add a reference to Advantage.Data.Provider • Specify the name space using Advantage.Data.Provider; ( C# ) Imports Advantage.Data.Provider ( VB.NET ) • Define the connection string • Create an AdsDataAdapter • Create a DataSource • Bind controls to the DataSource

  14. Advantage data adapter wizard* • Added with version 7.0.1 • Creates all the required objects • Connection • DataAdapter • SQL Commands • Allows for data preview

  15. Dealing With Concurrency • Last in Wins • Ok if reading one record at a time • Not for sensitive Inventory/Ticket applications • Version Number Approach • UPDATE Table1 Set Column1 = @newvalue1, Column2 = @newvalue2 WHERE RowVersion = @origRowVersionValue • Saving All Values Approach • UPDATE Customers SET CustomerID = @currCustomerID, CompanyName = @currCompanyName WHERE ( CustomerID = @ origCustomerID ) AND ( CompanyName = @origCompanyName OR @origCompanyName IS NULL and CompanyName IS NULL )

  16. Advantage Specific Functionality

  17. Adsconnection* • Connection Timeout • Database • Dictionary Version • Is Dictionary Connection • Server Name • Server Time • Server Type

  18. AdsExtendedDataReader • Filters • Index Support • Record Number • Ranges • Table Encryption • Record Locking • Copying Tables

  19. locating records* • Seek Types • Soft Seek • Hard Seek • Seek Last • Seek GT • Seek syntax Reader.Seek( New Object { <value> }, SeekType )

  20. Borland Data Provider • The Borland Data Provider (BDP) is a new data access method available in C# Builder and Delphi 8 • Requires Delphi 8 General Update 2 • Add Advantage information to bdpDataSources.xml for use in the IDE

  21. summary • ADO.NET • Advantage Data Provider • Advantage Connection • Advantage DataAdapter • Advantage DataReader • Advantage ExtendedDataReader • Borland Data Provider

  22. Questions ? ? ?

  23. Advantage Database Server: The Official Guide (ISBN 0-07-223084-3) is a new book, written by Cary Jensen and Loy Anderson and published by McGraw-Hill/Osborne Media Group, that systematically guides a developer through key functionality of Advantage and includes a Companion CD with code samples and a single-user license of Advantage Database Server version 7.0. http://www.extendedsystems.com/ADS/ADS+Book+Promo.htm

More Related