C# 1 CSC 298 ADO.NET
C# 2 ADO.NET A data access technology that maps very well to the world of the web (disconnected architecture) data is retrieved from the database and cached on the local machine (similar from a web session)
C# 3 Two providers SQL server.NET provider to interface with Microsoft SQL servers all of the code is managed by the CLR namespace System.Data.SqlClient OLE DB.NET for other data base servers goes through unmanaged code (not as efficient) namespace System.Data.OleDb
C# 4 Connecting to a database Use a Connection object, e.g. OleDbConnection c; c = new OleDbConnection( "provider = Microsoft.Jet.OleDb.4.0; " source = C:\Northwind.mdb"); Don't forget to open the connection c.open();
C# 5 Communicating with the DB Use a DataSet and a DataAdapter (e.g. OleDbDataAdapter) DB queries updates DataAdapter DataSet Displaying the data: use a DataGrid