
Module 3: Working with
Local Data

Overview
Using DataSets
Using XML
Using SQL Server CE

Lesson: Using DataSets
ADO.NET Model
Creating a DataSet
Filling the DataSet
Persisting the DataSet as an XML File
Binding to a DataSet
Using a DataGrid

Database
Database
DataSet
DataSet
Tables
Tables
DataTable
DataTable
DataRowCollection
DataRowCollection
DataColumnCollection
DataColumnCollection
ConstraintCollection
ConstraintCollection
DataRelationCollection
DataRelationCollection
ADO.NET Model
XML
XML
.NET Data Provider
.NET Data Provider
Connection
Connection
Transaction
Transaction
Command
Command
Parameters
Parameters
DataReader
DataReader
DataAdapter
DataAdapter
SelectCommand
SelectCommand
InsertCommand
InsertCommand
UpdateCommand
UpdateCommand
DeleteCommand
DeleteCommand

Dim myDS As New Da t a S e t ( " P roject" )
Dim m y D T A s DataTa b l e = _
myD S . T a b l e s .Add("T a s k " )
myD T . C o l u m n s.Add(" N a m e " , _
System.Type.GetType("System.String"))
myD T . C o l u m n s.Add(" S t a r t " , _
System.Type.GetType("System.String"))
myD T . C o l u m n s.Add(" D u r a t i o n ", _
System.Type.GetType("System.String"))
Dim m y D S A s New Da t a S e t ( " P roject" )
Dim m y D T A s DataTa b l e = _
myD S . T a b l e s .Add("T a s k " )
myD T . C o l u m n s.Add(" N a m e " , _
System.Type.GetType("System.String"))
myD T . C o l u m n s.Add(" S t a r t " , _
System.Type.GetType("System.String"))
myD T . C o l u m n s.Add(" D u r a t i o n ", _
System.Type.GetType("System.String"))
Creating a DataSet
DataTable
DataTable
DataSet
DataSet

