the whidbey release of ado net part 1
Skip this Video
Download Presentation
The Whidbey Release Of ADO.NET Part 1

Loading in 2 Seconds...

play fullscreen
1 / 31

The Whidbey Release Of ADO Part 1 - PowerPoint PPT Presentation

  • Uploaded on

The Whidbey Release Of ADO.NET Part 1. Greg Low Director White Bear Consulting & Lowell Computing [email protected] What we will cover:. This material combines content from a two part series.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'The Whidbey Release Of ADO Part 1' - erika

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
the whidbey release of ado net part 1

The Whidbey Release Of ADO.NET Part 1

Greg Low


White Bear Consulting & Lowell Computing

[email protected]

what we will cover
What we will cover:
  • This material combines content from a two part series.
  • Part 1 (level 200) covers the fundamental enhancements to ADO.NET in the Whidbey release.
  • Part 2 (level 300) covers the more advanced enhancements.
session prerequisites
Session Prerequisites
  • Experience with development in Visual Basic® .NET or Visual C#® using ADO.NET
  • Experience with the ADO.NET classes in the .NET Framework (either v1.0 or v1.1)
so why this presentation
So Why This Presentation?
  • ADO.NET has significant enhancements for the Whidbey release.
  • The product manager Pablo Castro describes it as an evolution, not a revolution ie: your existing code will still work.
  • Developers need to look at what can now be achieved, often improving performance with very little code modifications required.
agenda from session 1
Agenda (from Session 1)
  • Lots of code examples!
  • Server Enumeration
  • .NET Data Provider Enumeration
  • Multiple Active Result Sets
  • MDAC Dependency Removal
  • Batch Processing
  • Binary Serialization of Datasets
agenda from session 1 continued
Agenda (from Session 1 continued)
  • Paging
  • Yukon Data Type Support
  • Common Base Classes
agenda from session 2
Agenda (from Session 2)
  • Again, lots of code examples!
  • Asynchronous Processing
  • Bulk-copy Operations
  • Yukon User-Defined Data Types
  • SQL Server Notifications
  • DataTableReader
  • DataSet.Load
  • Transactions with SQL Server Snapshot Isolation
agenda from session 2 continued
Agenda (from Session 2 continued)
  • Miscellaneous Enhancements
    • FireInfoMessageEventOnUserErrors
    • UpdatedRowSource
    • StatementCompleted
    • StatisticsEnabled
session notes
Session Notes
  • We are discussing a product that has not been released yet.
  • Other significant changes will no doubt occur prior to release.
  • All material covered in this session is based on the editions of Whidbey and Yukon released at the PDC.
  • And to head off the obvious question, I don\'t know when it will be released!
server enumeration
Server Enumeration
  • Very, very common request in the newsgroups is "How can I populate a list of the available servers?"
  • DBProviderFactory class
  • Data Providers need to provide their own mechanisms for enumerating servers.
  • SQL Server™ demo
net data provider enumeration
.NET Data Provider Enumeration
  • You can also use the DBProviderFactories to get a list of data providers installed on your computer.
  • Listed in the machine.config file.
  • A DataTable called providerconfiguration is returned (Name, Description, InvariantName, AssemblyQualifiedName,SupportedClasses)
  • This should be useful when using the new common base classes.
  • Demo code
multiple active result sets
Multiple Active Result Sets
  • MARS allows more than one SQLDataReader to be open on a single connection.
  • Automatically supported when using Yukon.
  • Parameter in ConnectionString to disable it (MultipleActiveResultSets=false).
  • OLEDB provider provides support when connected to Yukon via MDAC v9.0. Simulates support on earlier MDAC or SQL Server versions.
  • Oracle provider provides support.
  • Demo code
mdac dependency removal
MDAC Dependency Removal
  • For the PDC release, on Windows XP or later, MDAC 9.0 is installed in side-by-side mode.
  • You must provide an application manifest with your ADO.NET application.
  • Version 2.0 of the .NET framework will not require MDAC to be installed when using the SQLClient.
  • For OLEDB and ODBC managed providers, versions 2.6, 2.7, 2.8 and later will do.
  • Manifest example code
batch processing
Batch Processing
  • DataAdapter.Update method can now update more than a single row in each remote procedure call to the database server.
  • UpdateBatchSize property.
  • -1 means "all rows"
  • Transaction support still present.
  • Demo code
binary serialization of datasets
Binary Serialization of DataSets
  • Developers have avoided using DataSets when data needs to be passed across boundaries.
  • Performance has been the key reason.
  • Binary Serialization can drastically improve performance of both serialization and deserialization.
  • Reduced memory utilization.
  • Other DataSet performance improvements have also been made eg. Faster index engine.
  • Demo code
  • New ExecutePageReader method
  • Fast mechanism for skipping rows in tables
  • Consistency issues need to be considered.
  • Demo code
dbtable class future uncertain
DbTable Class (future uncertain)
  • Standalone object.
  • Provides all functionality required to retrieve and manipulate data from a data source.
  • Extends the DataTable class.
  • Virtual class.
  • Instantiate via SqlDataTable, OleDbDataTable, OracleDataTable, ODBCDataTable, etc.
  • Demo code
yukon data type support
Yukon Data Type Support
  • SQL Server Yukon provides new datatypes
  • varchar(max), nvarchar(max), varbinary(max)
  • xml
  • ADO.NET / Whidbey natively supports these.
  • SqlDataReader.GetSqlXmlReader
  • Demo code
common base classes
Common Base Classes
  • Db*Base Classes
  • DbConnection, DbCommand, DbDataAdapter
  • Allows a degree of provider-independent applications.
  • SQL syntax is still database-specific
  • Demo code
asynchronous processing
Asynchronous Processing
  • The .NET Framework has a standard design pattern for async processing.
  • Caller determines whether the call will be async or sync.
  • ADO.NET now offers the same pattern.
  • Supported in SqlClient.
  • Requires MDAC 9.0 for the PDC build.
  • Less need for the dreaded hourglass!
  • Demo code
bulk copy operations
Bulk-Copy Operations
  • Transfer large amounts of data into a table or view.
  • Much faster than SQL INSERT statements.
  • SqlBulkCopyOperation class can be used to copy data from a DataReader or DataTable.
  • Full transaction support.
  • Demo code
yukon user defined data types
Yukon User-Defined Data Types
  • CLR types implemented in the SQL Server.
  • Objects returned in ADO.NET.
  • Methods can be called both on the server and on the client.
  • Demo code
sql server notifications
SQL Server Notifications
  • SqlCommand object can be configured to request a notification when the results of a given query would have changed.
  • Applications can refresh displays or caches.
  • Disconnected scenarios are possible.
  • SqlNotificationRequest, SqlDependency objects
  • Users may need special privileges to request a notification.
  • Application polls the notification queue.
  • Demo code
transactions with sql server snapshot isolation
Transactions with SQL Server Snapshot Isolation
  • Used to reduce blocking.
  • Stores a version of data that can be read by one app while another is modifying the original data in a transaction.
  • Similar effect to serializable transaction isolation level in terms of the view of the data.
  • Locks are not taken on the data.
  • Demo code
  • Reads the contents of a DataTable or a DataSet.
  • Ignores deleted rows.
  • DataSet.GetDataReader method
  • Reading a DataSet returns multiple resultsets if the DataSet contains more than one DataTable.
  • Demo code
dataset load
  • Loads a DataTable with rows from a data source.
  • Read from a DataReader.
  • Control loading via LoadOption parameter (Overwrite row, PreserveCurrentValues, UpdateCurrentValues)
  • Demo code
miscellaneous enhancements
Miscellaneous Enhancements
  • FireInfoMessageEventOnUserErrors
  • UpdatedRowSource
  • StatementCompleted
  • StatisticsEnabled
  • Demo code
session summary
Session Summary
  • ADO.NET in the Whidbey release offers an evolution, not a revolution.
  • ADO.NET in the Whidbey release can enhance your applications with little code modifications required.
  • ADO.NET in the Whidbey release opens up new possibilities for your applications.
for more information
For More Information
  • PDC Sessions
  • But particularly:
  • MSDN help files on PDC Whidbey DVD
get up to speed on net
Get Up to Speed on .NET

Get Trained on Microsoft Developer Technologies

  • Register for upcoming webcasts at