Simple Data Binding in Windows Forms

Let's quickly step through an example that will display a Customer ID, Company Name, and Contact Name from the Customer table in the Northwind database supplied in Microsoft SQL Server. More specifically, you will be creating a few TextBox controls on a form and binding the Text property on these TextBox controls to the Customers data source. Then, you will create a button that will activate the data retrieval and display the data to the form. This is simple binding.

Create a New Project in VS .NET

1.
Create a new project in VS .NET by choosing File, New, and then choosing the Project option.
2.
When the New Project dialog box appears, choose Visual Basic Projects (or Visual C# Projects) and Windows Applications. ...

Get Sams Teach Yourself ADO.NET in 24 Hours 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.