Programming with ADO'NET By Sam Nasr April 27, 2004 - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Programming with ADO'NET By Sam Nasr April 27, 2004

Description:

A set of libraries included within the .NET Framework ... Data Store: an object containing data. ... Built for CLR environment to maximize performance. ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 11
Provided by: clevelan1
Category:
Tags: ado | net | ado | april | nasr | programming | sam

less

Transcript and Presenter's Notes

Title: Programming with ADO'NET By Sam Nasr April 27, 2004


1
Programming with ADO.NETBySam NasrApril
27, 2004
2
What is ADO.Net?
  • ADO.NET ActiveX Data Objects
  • A set of libraries included within the .NET
    Framework
  • ADO.NET objects are contained in the System.Data
    namespace.

3
ADO.Net Terminology
  • Data Store an object containing data.
  • Data Provider Classes designed to communicate
    with a data store.

4
Advantages of ADO.NET
  • Built for CLR environment to maximize
    performance.
  • Greater Extensibility results can be retrieved
    in XML.
  • Allows the use of the Disconnected Objects
    (DataSet)
  • Allows multiple dataset objects for a join query.
  • Allows update logic when using a Disconnected
    Object.

5
  • All ADO.NET objects can be separated into 2
    categories
  • 1. Connected Objects that communicate directly
    with the database.
  • 2. Disconnected Objects that allow the user to
    work with the data offline.

6
Connected Objects
  • Connection
  • Transaction
  • DataAdapter
  • Command
  • Parameter
  • DataReader

7
Disconnected Objects
  • DataSet
  • DataTable
  • DataView
  • DataRow
  • DataColumn
  • Constraint
  • DataRelation

8
Syntax for a single query statement
  • SqlCommand cmd new
  • Sqlcommand(select from customers, _ conn)
  • Adapter.fill(ds) to fill a single dataset
  • Adapter.fill(ds, customers) to fill a single
    dataset and name it.

9
Syntax for a multiple query statement
  • SqlCommand cmd new _
  • Sqlcommand(select from customers select
    from orders, conn)
  • Adapter.fill(ds)
  • Ds.tables0.TableName Customers
  • Ds.tables1.TableName Orders

10
Using .UDL files
  • .UDL Universal Data Link
  • UDL files store a connection string for any data
    connectivity task.
  • Interface is identical to the Data Adapter.
Write a Comment
User Comments (0)
About PowerShow.com