Building Data-Driven Forms with the Server Explorer

As you learned yesterday, databinding is everywhere in .NET. You can literally bind any type of data source to any type of object. Using the Server Explorer in .NET, you can set up quick-and-dirty data entry forms with just a few lines of code.

To see how to use the Server Explorer to create a data entry form, double-click the default Form1 in the DataTools project that you've been working with.

After the form is in the Forms Designer, drag the Categories table from the Northwind database in the Server Explorer onto the form. A SqlConnection object and a SqlDataAdapter object are added automatically to your form. Figure 11.11 is what your project should look like at this point.

Figure 11.11. ...

Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.