Presentation is loading. Please wait.

Presentation is loading. Please wait.

Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Prerequisites.

Similar presentations


Presentation on theme: "Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Prerequisites."— Presentation transcript:

1 Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Jackie@Renaissance.co.il Prerequisites for presentation: I assume you know: 1) Visual Basic.NET 2) ADO 2.X Level: Intermediate ##

2 Jackie Goldstein… General Manager of Renaissance Computer Systems –Consulting, Training, & Development, with Microsoft Tools & Technologies Author of “Database Access with Visual Basic.Net” (ISBN 0-67232-3435, Addison-Wesley) MSDN Regional Director for Israel Founder and monthly host of IVBUG (Israel Visual Basic User Group) Speaker at local & international developer conferences: –Microsoft Developer Days, TechEd, –VSLive!, VBITS, VB DevCon, SQL2TheMax Selected as SME (Subject Matter Expert) to help develop/review content for DevDays with Microsoft team in Redmond

3 Session Topics ADO.NET Architecture ADO.NET Object Model ADO.NET and XML Summary and Questions

4 Session Topics ADO.NET Architecture ADO.NET Object Model ADO.NET and XML Summary and Questions

5 ADO.NET ADO Look and Feel… Direct OLE DB connectivity… Integrated with.NET Framework… Integrated with XML… "Designed for the Enterprise"…

6 The.NET Framework Applications Are Built Using the Framework Common Language Runtime Memory MgmtType SystemLifetime System Base Classes IOThreadingSecurityServiceProcess DataOledbSQLClientXML System.Web Web ServicesWeb Forms ASP Application Services System.Windows.Forms ControlsDrawing Windows Application Services

7 ADO.NET Object Model Classic ADO styling… –Connection –Command, Parameter …but a lot more functionality & flexibility –DataReader Forward-only, Read-only "RecordSet" –DataTable and DataSet Disconnected, In-Memory Cache –DataAdapter Connects a DataSet with a data source

8 .NET Data Provider DataReader Command Connection Sync Data In The.NET Platform Controls, Designers, Code-gen, etc DataSet XmlReader XmlText-ReaderXmlNode-Reader XSL/T, X-Path, Validation, etc XmlData- Document Data-Adapter

9 Points to Note in ADO.NET vs. ADO Separation between connected data access model and disconnected programming model No CursorType, CursorLocation, or LockType ADO Recordset functionality is split into smaller, specific objects, e.g. DataReader, DataTable, Command ADO.NET allows manipulation of XML data, not just XML as I/O format

10 Session Topics ADO.NET Architecture ADO.NET Object Model ADO.NET and XML Summary and Questions

11 .NET Data Providers Manage interaction to a data source Microsoft Implementations –OLEDB.NET Data Provider –SQLServer.NET Data Provider –ODBC.NET Data Provider –Oracle.NET Data Provider –Exchange.NET Data Provider Main Objects: –Connection, Command, Parameter –DataReader, DataAdapter DataStore DataProvider

12 Demo – Using.NET Data Providers Connection Object Command Object DataReader Object

13 DataSet Object DataSet DataTable DataTable DataRow DataColumn Relations Constraints XML Schema

14 DataAdapter Object DataAdapter SelectCommand InsertCommand UpdateCommand DeleteCommand TableMappings Database DataSet

15 Demo – Using the DataAdapter Simple Fill Database Updates Using the DataAdapter Configuration Wizard

16 Strongly Typed DataSet Deal with DataSets, Tables, and Rows as Objects –Columns and Relations as properties Class Generated At Design Time –Inherits from DataSet –Schema coded into the class Benefits –Statement completion –Compile time type checking –Concise, readable code

17 Session Topics ADO.NET Architecture ADO.NET Object Model ADO.NET and XML Summary and Questions

18 .NET Data Provider DataReader Command Connection Sync Unified Architecture Controls, Designers, Code-gen, etc DataSet XmlReader XmlText-ReaderXmlNode-Reader XSL/T, X-Path, Validation, etc XmlData- Document Data-Adapter

19 ADO.NET And XML (1) The DataSet –Loads/saves XML data into/out of DataSet –Schema can be loaded/saved as XSD –Schema can be inferred from XML Data

20 ADO.NET And XML (2) Data is XML is Data XmlDataDocument unifies XML and Data –Simultaneously exposes data relationally or as XML –Exposes a relational view over structured XML Plugs into entire stack of XML services –Subclass of XmlDocument – it’s a DOM –Retains fidelity of underlying document Plugs into entire stack of Data services –Can obtain a DataSet view of an XmlDataDoc –Relational and XML views stay in sync

21 Scenarios Enabled Simultaneously expose data relationally or as XML –Good for semi-structured data –Multiple tools on same data Map interesting subset relationally using schema –Use natural object model for each subset Both DOM and DataSet can “grow up”

22 Demo – Accessing XML Data XML Navigation and Selection XML Format in ADO.NET vs. ADO 2.X Synchronization of Relational and XML Views of data

23 Session Topics ADO.NET Architecture ADO.NET Object Model ADO.NET and XML Summary and Questions

24 Comparison Between ADO and ADO.NET (1) FeatureADOADO.NET Memory-resident Data Representation RecordSet can contain one table DataSet can contain one or more tables represented by DataTable Object Relationship Between Multiple Tables Require the JOIN querySupports the DataRelation object Data VisitationScans RecordSet rows sequentially Uses a navigation paradigm for non- sequential access Disconnected AccessProvided by RecordSet but typically supports connected access Communicates with standardized calls to the DataAdapter

25 Comparison Between ADO and ADO.NET (2) FeatureADOADO.NET ProgrammabilityUses Connection object to transmit commands Uses strongly typed programming characteristics of XML Sharing Disconnected Data Between Tiers or Components Uses COM marshalling to transmit disconnected record set Transmits a DataSet with an XML file Transmitting Data Through Firewalls Problematic because firewall are typically configured to prevent system-level requests Supported, DataSet object use XML, which can pass through firewalls ScalabilityDatabase locks and active database connections for long durations Disconnected access to database data without retaining database locks

26 Session Summary A natural evolution of ADO Designed with extensive XML support Closely integrated with the.NET Framework Provides fast and efficient mechanisms for connected data access and disconnected data manipulation Try it – You’ll Like it !!!

27 Questions?

28 Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Jackie@Renaissance.co.il Prerequisites for presentation: I assume you know: 1) Visual Basic.NET 2) ADO 2.X Level: Intermediate ##


Download ppt "Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Prerequisites."

Similar presentations


Ads by Google