This topic demonstrates how to connect a screen to a SQL Server Database.
Complete the following steps:
- In Solution Explorer, right click Data Sources folder.
- Select Add Data Sources. The Attach Data Source Wizard appears.
- In the Choose a data Source Type page, click Database, and then click Next.
- The Choose Data Source dialog box appears, click Microsoft SQL Server, and then click Continue.
- In the Server name box of the Connection Properties dialog box, enter the name of the SQL Server instance that you want to connect to.
- If your database is set up to use Windows authentication, click Use Windows Authentication. Otherwise, click Use SQL Server Authentication, and then enter user name and password to access database.
- Click Select or enter a database name. Then, in the drop-down list, select or enter the name of the database that you want to connect to, and then click OK. The Choose Your Database Objects page appears.
- In the Choose Your Database Objects page, select the tables and views that you want to use in your project, and then click Finish.
- The database, tables, and views that you selected appear in Solution Explorer as sub nodes of the Data Sources node.
See Also