Skip to Content
Microsoft® Visual C#® .NET 2003 Kick Start
book

Microsoft® Visual C#® .NET 2003 Kick Start

by Steven Holzner
June 2003
Intermediate to advanced
624 pages
12h 41m
English
Sams
Content preview from Microsoft® Visual C#® .NET 2003 Kick Start

Creating a Dataset in Code

The ch10_01 example creates a connection to a data source, SQL Server in this case, and then binds the data from that data source to a data grid. This example uses the authors table in the pubs database, and displays that table, as you can see in Figure 10.2.

Figure 10.2. The ch10_01 example.

We'll take this example apart line by line to see what makes it tick. When the user clicks the Connect to Database button you see in Figure 10.2, this application starts by creating a new dataset object named dataset1, passing that name to the DataSet constructor (note that we're using the System.Data.SqlClient namespace here to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® .NET Kick Start

Microsoft® .NET Kick Start

Hitesh Seth

Publisher Resources

ISBN: 0672325470Purchase book