Saberware Computer Consultants General Information: eric@saberware.com
Sales:
sales@saberware.com
Phone: (330) 966-0726
  Mobile: (330) 353-0832
Postal address:1119 Glenwood St., SW North Canton, OH 44720

ICQ:11864376
Home News Products Links Downloads

Snippet of what's to come!!


Traditional ADO presented several objects for accessing and manipulating relational data.
 
Connection  - a connection to a relational database such as Access or SQL Server
Recordset   - an object used to represent a group of related data records
Record       - an individual record of a recordset representing one Row of data
Field          - an individual field from a record or recordset representing one Column of data
 
The RecordSet object is the heart of traditional ADO.  It is usually (but not always) a set of data gathered from a relational database for displaying or updating records in a table or tables.
 
Now we are drawn into the cross-platform, inter-company data-sharing and collaboration revolution with nothing less than a revolutionary new development platform called .NET.  .NET introduces us to a whole new way of thinking and developing, we are given a new language called C# (C sharp), and perhaps one of the biggest, most impactful changes in the .NET environment is the way we access, share, communicate, and manipulate data.  Enter ADO.NET
 
ADO.NET scaps nearly everything you ever knew about data access including but not limited to DAO, RDO and ADO up to v2.6.
Gone is the RecordSet, Record, and Field from ADO.  Gone are the concept of RecordSet, Record, and Field.  Say hello to DataSets, DataTables, DataRows and DataReaders.  At first the changes can seem very overwhelming especially for developers used to simple data Access methods offered by DAO or ADO.
However, when we look under the hood at what's really going on, it begins to make much more sense than the "old school" way of doing things.
 
Traditional ADO:
 
Dim cn As ADODB.Connection
Dim rs As ADODB.RecordSet
Dim sQry As String
 
Set cn = new ADODB.Connection
cn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:MyDatabase.mdb")
 
sQry = "Select * >From MyTable"
Set rs = cn.Execute(sQry)
 
ADO.NET
 
Dim cn As OleDbConnection
Dim sQry As String
Dim ds As DataSet
Dim da As OleDbDataAdapter
 
cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:MyDatabase.mdb")
cn.Open()
 
ds = new DataTable("MyTable")
 
sQry = "Select * >From MyTable"
da = new OleDbDataAdapter(sQry, cn)
da.FillSchema(ds, SchemaType.Source, "MyTable")
da.Fill(ds)
 
 
Not only do these two ways of accessing the data in MyDatabase.mdb look different, they really are very different as we'll see.....
 
<insert graphic here>
 
goody


Copyright © 2001, Saberware Computer Consultants
Send mail to webmaster@saberware.com with questions or comments about this web site.
Last modified: November 05, 2001