We need a database to store our information. Before adding the remaining fields to the form, we need to create a database to connect to the form. The IDE creates a lot of code to connect the data to our form, but we still have to create the database itself first.
1 Add an SQL database to your project
In the Solution Explorer, right-click the Contacts item, select Add, and then select New Item. Select the SQL database icon and name it contactdb.mdf.
2 Cancel the Data Source Configuration Wizard. Now, we want to skip the step of configuring the data source, so click the Cancel button. We go back to this step as soon as we have the database structure set up. 3 View your database in the Solution Explorer.
In the Solution Explorer you will see that CONTACTDB has been added to the file list. Double-click Contactdb.mdf to see the left side of your screen. The Toolbox has become a database browser.