Datasheet
Chapter 1
16
•
❑ Reading/converting the data. Through the connection, we can tell the database to add, delete,
and update records, to return information to us, and so on. As you can see from the diagram,
there is more involved here than in the other steps. This is because the database expects
commands to be in a different language from that of the application, and the application
expects data to be returned in a different format from that stored in the database. Once
information has been sent or retrieved, however, the connection to the database can usually be
terminated. In special cases, an open connection is maintained, allowing data to be returned
and displayed a little at a time, rather than all at once.
❑ Displaying the data. Once the data has been retrieved and converted into the correct format, it
is usually transformed in some way to a format that's viewable by the user, such as an HTML
table. Although there are far more operations during the reading and converting of the data,
these largely happen behind the scenes, and in web applications it's often the case that
presenting the information well takes the most time to implement. As we'll see later, however,
ASP.NET offers us some help in this regard.
That's a lot of information, and lot of the things we'll be talking about in the first few chapters of this
book where we will cover these issues more slowly, and in much greater depth. It also sounds like a lot
of work – in fact, it is a lot of work – but mercifully we don't have to do all of it ourselves. Help is at
hand in the form of ADO.NET, and that's our subject for the next section.
Introduction to ADO.NET
As described above, there are many different data stores that can provide information to an application.
Microsoft realized a long time ago that having a single programming interface for accessing these
diverse stores makes sense – it allows applications to make use of the latest versions of database servers
with minimal changes to code, and it makes for interoperability between platforms.
With every new Microsoft platform comes a new way of accessing data stores. In the .NET Framework,
the technology is called ADO.NET, but that builds upon the previous data-access functionality of
technologies such as ADO, OLE DB, RDO, DAO, and ODBC. It provides an appropriate method for
accessing data in modern applications that are more widely distributed than was previously the case.
After describing underlying technologies such as OLE DB and ODBC, this section will place ADO.NET
into context with the technologies that came before it, and go on to explain the architecture of
ADO.NET in a little detail.
A History of Data Access on the Windows Platform
As soon as you start to think about accessing data on the Windows platform, you find yourself
confronted with a list of abbreviations rather like the one in the second paragraph above. Here, we'll try
to untangle the letters, and help you to understand how all of these technologies fit together – which, by
and large, they do.