DAT 390 Advanced ADO.NET Programming Techniques Jackie Goldstein Renaissance Computer Systems

Slides:



Advertisements
Similar presentations
17. Data Access ADO.Net Architecture New Features of ADO.NET
Advertisements

CC SQL Utilities.
DEV351 ADO.NET Performance Pablo Castro Program Manager – ADO.NET Team Microsoft Corporation.
Chapter 10 ADO. What is ADO? ADO is a Microsoft technology ADO stands for ActiveX Data Objects ADO is a programming interface to access data in a database.
Introduction to Database Processing with ADO.NET.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Using ADO.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Tutorial 11: Connecting to External Data
OFC324 Microsoft Project Server: Putting Enterprise Project Management (EPM) To Work Sam Brooks
DAT304 Leveraging XML and HTTP with Sql Server Irwin Dolobowsky Program Manager Webdata Group.
OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
Chapter 9 Using the SqlDataSource Control. References aspx.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified.
Chapter 61 Managing Data Sources Introduction to ASP.NET By Kathleen Kalata.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
ADO.NET Tools and Wizards. Slide 2 Data Sources Window (Introduction) Use the Data Sources window to Establish a connection Create bound control instances.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
DAT305 Boost Your Data-Driven Application Development Using SQL Server Centric.NET Code Generator Pascal Belaud Microsoft France.
OFC 303 Advanced Word XML: Customer-Defined Schemas Brian Jones Program Manager Authoring Services.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
DEV339 Best Practices for Debugging Visual Studio.NET Applications Keith Pleas Architect, Guided Design
OFC 308 Advanced Word XML: The WordML Schema and Bringing Everything Together Brian Jones Program Manager Authoring Services.
CHAPTER EIGHT Accessing Data Processing Databases.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
Moving from Microsoft ® ADO 2.X To ADO.NET Jackie Goldstein Renaissance Computer Systems Ltd. MSDN Regional Director, Israel Prerequisites.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
ASP.NET Rina Zviel-Girshin Lecture 5
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
Presented by Joseph J. Sarna Jr. JJS Systems, LLC
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
An Introduction to ADO.Net Marmagna Desai.NET Seminar, Fall-2003.
1 Data Classes- DataView DataGridView Control. Objectives 2  Data Class  DataAdapter  DataReader  DataSet  DataTable  DataView  DataGridView Control.
OFC291 Microsoft® Office Word XML (part 1 of 3): Introduction Martin Sawicki Lead Program Manager.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
DAT 332 SQL Server 2000 Data Transformation Services (DTS) Best Practices Euan Garden Product Unit Manager SQL Server Development Microsoft Corporation.
DEV330 Visual Studio.NET IDE Tips and Tricks Billy Hollis Author / consultant.
Mauricio Featherman, Ph.D. Washington St. University
DEV383 The ADO.NET DataSet and You Jackie Goldstein General Manager Renaissance Computer Systems
EBIZ327 InfoPath and BizTalk Server 2004 Scott Woodgate Jupiter Product Planner.
MSG331 Exchange Server 2000/2003 Software Development Kit Susan Hill Lead Programmer Writer Microsoft Corporation.
DAT300 SQL Server Notification Services: Application Development Ken Henderson Technical Lead, SQL Server Support Microsoft Corporation
HNDIT Rapid Application Development
DataSets Demystified. Who I am Shawn Wildermuth Senior Consultant with Magenic Technologies ( C# MVP INETA.
EBIZ302 Jupiter Business Process Automation and Web Services David Fong Program Manager.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
DAT 405 Extreme SqlXml Irwin Dolobowsky Program Manager – SqlXml Microsoft Corporation.
DAT200 Microsoft® ADO.NET for ADO Classic Developers: Introducing ADO.NET Jackie Goldstein Renaissance Computer Systems
Module 2: Using ADO.NET to Access Data. Overview ADO.NET Architecture Creating an Application That Uses ADO.NET to Access Data Changing Database Records.
1 ADO Activex Data Objects. 2 ADO ADO allows users to access data easily from many existing databases (such as Access or Paradox) From ODBC compliant.
OFC311 Developing Microsoft Office InfoPath 2003 Solutions: Technical Drilldown Part 1 Tudor Toma Group Program Manager Office Microsoft Corporation.
Data Access. ADO.NET ADO.NET is the primary library for building database solutions within the.NET Framework. ADO.NET does not replace ADO. ADO and OLEDB.
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
ADO.NET Framework.
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Active Data Objects Binding ASP.NET Controls to Data
Avalon – Using Data In Your Applications
Optimizing Microsoft SQL Server 2008 Applications Using Table Valued Parameters, XML, and MERGE
VB.NET Using Database.
Chapter 10 ADO.
PROG Advanced Web Apps 4/13/2019 Programming Data Pages Wendi Jollymore, ACES.
Visual Studio + SQL Server Is Better
Active Data Objects Binding ASP.NET Controls to Data
Presentation transcript:

DAT 390 Advanced ADO.NET Programming Techniques Jackie Goldstein Renaissance Computer Systems

Jackie Goldstein… General Manager of Renaissance Computer Systems Consulting, Training, & Development, with Microsoft Tools & Technologies Author of “Database Access with Visual Basic.Net” (ISBN , 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 2000 and DevDays 2001 with Microsoft team in Redmond

Session Topics “Here You Come Again” A Quick Review “One, Twice, Three Times a Lady” 3 Ways to Configure the DataAdapter “I Can See Clearly Now” Data Views and DataRowViewState “Love Will Keep Us Together” Multi-Table Reads and Updates “We Can Work it Out” Concurrency Conflicts Questions and Summary

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

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

DataSet Object DataSet DataTable DataTable DataRow DataColumn Relations Constraints XML Schema

DataAdapter Object DataAdapter SelectCommand InsertCommand UpdateCommand DeleteCommand TableMappings Database DataSet

“One, Twice, Three Times a Lady” 3 Ways to Configure the DataAdapter The CommandBuilder Object Explicit Code The DataAdapter Configuration Wizard demo demo

“I Can See Clearly Now” DataViews and DataRowViewState Multiple simultaneous views of the same DataSet data, filtered and sorted byDataRowViewState demo demo

“Love Will Keep Us Together” Multi-Table Reads and Updates The standard methods of generating update command for the DataAdapter (CommandBuilder and DataAdapter Configuration Wizard) support only single-table updates How do I do multi-table reads and updates ?

“Love Will Keep Us Together” Multi-Table Reads and Updates Use Batch SQL / Stored Procedures to load multiple DataSet tables in one server round-trip Use ExecuteXmlReader to fetch hierarchical data and load into DataSet Update multiple tables using a Stored Procedure Issue multiple update commands by calling the Update methods of the individual DataAdapters

“Love Will Keep Us Together” Multi-Table Updates Generally update related tables in the following order: 1. Child Table: Delete Records 2. Parent Table: Insert, Update, and Delete records 3. Child Table: Insert and Update records

“ Love Will Keep Us Together” Multi-Table Reads and Updates demo demo Read multiple tables into the DataSet in a single round-trip to the database server Update the database with changes to multiple tables

“We Can Work it Out” Concurrency Conflicts Why Optimistic Locking ? Conflict Detection Conflict Resolution DataSet maintains 3 views of field value: Original, Current, and Proposed (during edit) Can force changes, reject changes, or reject changes and reload data from source

What defines a conflict ? ADO 2.X – Dynamic Property “Update Criteria” adCriteriaUpdCols (default) adCriteriaAllCols adCriteriaTimeStamp adCriteriaKey ADO.NET Auto-generated commands include PK and all fields in UPDATE and DELETE statements Developer can specify own custom SQL statements (e.g. if 2 of the 5 columns were modified)

Differences in ADO.NET Can be automatically generated (but with limitations) Greater flexibility in defining what constitutes a conflict (see previous slide) A little more manual code required Passing different versions of columns Retrieving current database values More flexibility in handling batches with one or more conflicts

“We Can Work it Out” Concurrency Conflicts demo demo Detecting and resolving concurrency conflicts

Summary The DataSet (and its associated objects) provides very flexible data manipulation The DataAdapter provides flexible and powerful batch update support The DataView allows multiple simultaneous views of the same DataSet data Dig into the details !

Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide User Groups Meet and learn with your peers

Ask The Experts Get Your Questions Answered I will be in the Microsoft Ask The Experts area during the following hours: Wednesday13:00 – 14:00 Thursday13:00 – 14:00

evaluations evaluations

Questions?

Titles and Artists “Here You Come Again” Dolly Parton “One, Twice, Three Times a Lady” The Commodores “I Can See Clearly Now” Johnny Nash “Love Will Keep Us Together” The Captain & Tennille “We Can Work it Out” The Beatles

© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.