ado.net database access in.net style!. question 1 ado is an acronym for a. another dang object b....

14
ADO.NET ADO.NET Database access in .NET style!

Upload: marilyn-mckenzie

Post on 13-Jan-2016

229 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

ADO.NETADO.NETDatabase access in .NET style!

Page 2: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

Question 1Question 1

ADO is an acronym for

A. Another Dang ObjectB. Asynchronous Data ObjectC. Active Disk ObjectD. ActiveX Data Object

Page 3: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

What is ADOWhat is ADO

Microsoft ADO (ActiveX Data Objects) is a Component object model object for accessing data sources. It provides a layer between programming languages and OLE DB (a means of accessing data stores, whether they be databases or otherwise, in a uniform manner), which allows a developer to write programs which access data, without knowing how the database is implemented. You must be aware of your database for connection only. No knowledge of SQL is required to access a database when using ADO, although one can use ADO to execute arbitrary SQL commands. The disadvantage of this is that this introduces a dependency upon the database.It is positioned as a successor to Microsoft's earlier object layers for accessing data sources, including RDO (Remote Data Objects) and DAO (Data Access Objects). ADO was introduced by Microsoft in the winter of 1996.

- Wikipedia.org (http://en.wikipedia.org/wiki/ActiveX_Data_Objects)

Page 4: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

What is ADO.NETWhat is ADO.NET

ADO.NET (or the new ActiveX Data Objects technology) is the primary relational data access model for Microsoft .NET-based applications. It may be used to access data sources for which there is a specific .NET Provider, or, via a .NET Bridge Provider, for which there is a specific OLE DB Provider, ODBC Driver, or JDBC Driver. ADO.NET is sometimes considered an evolution of ADO technology, but it is important to note that some major changes were made between the two.

- Wikipedia.org (http://en.wikipedia.org/wiki/ADO.NET)

Page 5: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

Question 2Question 2

A WIMP is

A. A person unwilling to take a stand on an issue

B. Eric Brown in a previous lifeC. A MS-Windows centric web application

modelD. Darl McBride, President and CEO, The

SCO Group

Page 6: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

Where does it all belong?Where does it all belong?

AMP/WAMP/LAMP {0,Windows,Linux}, Apache, MySQL, {PHP, Python, Perl}

WIMSA Windows, IIS, MS-SQL, ASP/ADO

WIMP Windows, IIS, MySQL, {PHP, Python, Perl}

Further proof that Computer Scientists use way too many acronyms!

Page 7: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

The Big PictureThe Big Picture

As true with any type of database programming, web applications need a middle layer to detach the application from the database

Some believe it is desirous to have an all-encompassing object to handle this middleware function

Enter ADO.NET …

Page 8: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

Question 3Question 3

Which of the following are the 2 primary components of the ADO Object Model?

A. DataGridB. Data ProviderC. DataResultGridD. DataSet

Page 9: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

ADO.NET PartsADO.NET Parts

From Programming ASP.NET, 3rd Edition By Dan Hurwitz, Jesse Libertyhttp://proquest.safaribooksonline.com/059600916X/progaspdotnet3-CHP-10-SECT-1

Page 10: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

DataSet MethodsDataSet Methods

Method Type Description

AcceptChanges void Accepts all the changes made since loaded or since last time AcceptChanges was called (see GetChanges).

Clear void Clears the dataset of any data.

GetChanges DataSet Returns a copy of the dataset containing all the changes made since loaded or since AcceptChanges was called.

GetXML string Returns the XML representation of the data in the dataset.

GetXMLSchema string Returns the XSD schema for the XML representation of the data in the dataset.

Merge void Merges the data in this dataset with another dataset. Overloaded.

ReadXML XmlReadModeReads an XML schema and data into the dataset. Overloaded.

Page 11: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

DataSet Methods (cont.)DataSet Methods (cont.)

Method Type Description

ReadXMLSchema void Reads an XML schema into the dataset.

RejectChanges void Rolls back to the state since last AcceptChanges (see AcceptChanges).

WriteXML void Writes out the XML schema and data from the dataset. Overloaded.

WriteXMLSchema void Writes the structure of the dataset as an XML schema. Overloaded.

Page 12: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

Example CodeExample Code

Page 13: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

QuestionsQuestions

OK, if that is all of the questions, I have some.

Page 14: ADO.NET Database access in.NET style!. Question 1 ADO is an acronym for A. Another Dang Object B. Asynchronous Data Object C. Active Disk Object D. ActiveX

QuizQuiz

1. ADO is an acronym for ?2. A WIMP is ________________ ?3. Name the 2 major components of

the ADO Object Model. 4. (True/False) An ADO object cannot

write XML representations.