Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.Data.SQL MSDAORA (Oracle) JOLT (Jet) OLEDB for ODBC providers OleDbConnection, OleDbCommand and OleDbDataReader classes Classes for error handling Classes for connection pooling ADO.NET Classes DataReader DataReader Example string sConnString = “Provider=SQLOLEDB.1;” + “User ID=sa;Initial Catalog=Northwind;” + “Data Source=MYSERVER”; OleDbConnection conn = new OleDbConnection(sConnString); conn.Open(); string sQueryString = “SELECT CompanyName FROM Customers”; OleDbCommand myCommand = new OleDbCommand(sQueryString, conn); OleDbDataReader myReader = myCommand.ExecuteReader(); while (myReader.Read()) { Console.WriteLine(myReader.GetString(0)); } myReader.Close(); conn.Close(); 20 5/29/2013 5/29/2013 ADO.NET Classes System.Data Namespace Contains the core classes of the ADO.NET architecture Disconnected DataSet is central Supports all types of applications Internet based ASP.NET XML Windows forms based ADO.NET Classes System.Data Namespace Contains classes used by or derived from managed providers IDbConnection, IDbCommand, IDbDataReader 21 5/29/2013 5/29/2013 DataAdapter & DataSet ADO.NET Classes DataSet A collection of tables Has no knowledge of the source of the data Keeps track of all relationships among tables Rich programming model (has objects for tables, columns, relationships, and so on) Remembers original and current state of data Can dynamically modify data and metadata Native serialization format is XML Located in System.Data 22 5/29/2013 5/29/2013 ADO.NET Classes DataSet DataSet DataSet DataTable DataColumn DataRow DataRelation ADO.NET Classes System.Data.SqlClient Namespace Managed provider native to SQL Server Built on TDS (Tabular Data Stream) for high performance in SQL Server SqlConnection, SqlCommand and SqlDataReader classes Classes for Error handling Connection pooling (implicitly enabled by default ) System.Data.SqlTypes provides classes for native SQL Server data types 23 5/29/2013 5/29/2013 ADO.NET Classes IDataAdapter IData...
View Full Document

This note was uploaded on 04/04/2014 for the course CS 5950 taught by Professor Staff during the Summer '08 term at Western Michigan.

Ask a homework question - tutors are online