Datasheet

Chapter 1
26
Custom Controls
While the controls that come built into .NET provide us with a great deal of functionality, and cater for
most situations, there are always circumstances where we require something unique. After all, if
applications were all the same, then there would be none left to write by now! When we find ourselves
in this situation, .NET doesn't leave us in the lurch. We can create our own controls that support all of
the features of the built-in ones, and more. We don't even have to write these controls from scratch,
because custom controls can be created:
By deriving a new one from an existing control, and adding the required functionality
By composing a new custom control using two or more existing controls
By creating a control from scratch, making use of base controls such as Tables and Input elements
Although it's not a subject we'll be pursuing further in this book – we've got enough on our plate as it
is! – this aspect of ASP.NET web server controls is yet another reason to be enthusiastic about the
wealth of options available for data access under ASP.NET.
The Microsoft SQL Server Desktop Engine
As our final act in this chapter, we need to do something that will set us up for the rest of the book.
During the course of the discussion so far, we've mentioned the names of a number of different
databases, but it can't have escaped your attention that if we're going to demonstrate anything useful in
the chapters to come, we need to set up a database of our own.
Our choice is to use the Microsoft SQL Server Desktop Engine (MSDE), which is a specialized version
of SQL Server 2000. In this section, we'll explain what it is, why we've chosen to use it, and – most
important of all – how you can get hold of it and install it.
A Smaller SQL Server
The first thing to say about MSDE is that it's entirely compatible with SQL Server, which is truly an
enterprise-class database server. This means that the things you learn while using MSDE will stand you
in good stead when you come to use SQL Server itself – it behaves in exactly the same way. From our
perspective here, though, the immediate benefits of MSDE are:
It's freely distributable
It's currently sitting on your Visual Basic .NET discs, just waiting for you to install it
What this means is that as well as providing the perfect system for us to learn and experiment with, a
complete web application can initially be produced and distributed without incurring any costs for the
database server. If the system expands at a later date, it can be ported to the commercial distribution of
SQL Server with next to no effort. The only features cut down from the full version of SQL Server are
that the MSDE is optimized for (but not limited to) up to five connections at a time, that the maximum
database size is limited to 2GB, and that some enterprise features are absent.