How to Connect to SQL Express With Visual Studio 2010
- 1). Click "Start," "Visual studio 2010."
- 2). Click "Show Data Sources" on the "Data" menu. Choose "Add New Data Source" in the "Data Sources" window.
- 3). Select "Database" on the "Choose a Data Source Type" window. Click "Next."
- 4). Select "Dataset" on the "Choose a Database Model" window. Click "Next."
- 5). Select "New Connection" on the "Choose Your Data Connection" window to create a new data connection.
- 6). Select "Microsoft SQL Server Database File." Click "Continue."
- 7). Enter the path of the database file that you want to access.
- 8). Click "OK," "Next." Click "Yes" to copy the database file to your project.
- 9). Click "Next" on the "Save Connection String to the Application Configuration File window.
- 10
Expand the "Tables" node, select your database table and click "Finish to connect your SQL database with the Visual Studio application.
Source...