Updating clause used in instead
Therefore, the screen shots above are different for the Access Data Source.Specifically, the first screen shot examined prompts for a file location; since there is no connection string, the second screen shot does not appear in the Access Data Source.
Regardless of where your database is located, once you have a database to work with in order to access its contents you'll want to add a Sql Data Source (or Access Data Source) control to the page. The Data Source controls display in the Designer as a little gray box; they do not emit any HTML markup when a browser visits the page.
In order to correctly access data, we must set a variety of Sql Data Source properties that indicate the database to use and the query to execute.
NET 2.0 introduced a number of new Web controls designed for accessing and modifying data. In short, with the Data Source controls you can work with data without having to write a lick of data access code. NET 1.x, which required oft-repeated code to access data.
These controls allow page developers to declaratively access and modify data without writing any code to perform the data access. For example, to display the contents of a database table in a web page with ASP. NET 2.0, data can be accessed entirely from declarative markup.
For this article I'm going to demonstrate connecting to, retrieving, and displaying data from the Microsoft Access Northwind database, which is included in the download.
(Note that I'm using a slightly modified, slimmed down version of Northwind, one whose Forms, Modules, Reports, and Macros have all been deleted to reduce the file size.) ASP. When using professional grade database systems, like Microsoft SQL Server, typically the database is registered on a separate database server. Next, drag a Sql Data Source control from the Toolbox onto the Designer.
With the declarative, "code free" Data Source controls you can create a page that displays database data in under 15 seconds and without having to write a line of code. Both controls have virtually the same featureset, the only difference being how you specify the connection information.
In fact, the Access Data Source control is really superfluous since Microsoft Access databases can be accessed through the Sql Data Source control just as easily.
To specify a different ordering, click the ORDER BY button.