LightSwitch HTML Edition
Connect to SQL Server Database

To connect to a SQL Server Database, complete the following:

  1. In the Solution Explorer, click the Data Sources node.
  2. On the Project menu, click Add Data Source. The Attach Data Source Wizard appears.
  3. In the Choose a data Source Type page, click Database, and then click Next.
  4. If the Choose Data Source dialog box appears, click Microsoft SQL Server, and then click Continue.
  5. In the Connection Properties dialog box, make sure that Microsoft SQL Server (SqlClient) appears as selected in the Data source box.
  6. In the Server name box of the Connection Properties dialog box, type the name of the SQL Server instance that you want to connect to.
  7. If your database is set up to sue Windows authentication, click Use Windows Authentication. Otherwise, click Use SQL Server Authentication, and then provide the user name and password of a user who has access to the database.
  8. Click Select or or enter a database name. Then, in the Select or enter a database name drop-down list, select or type the name of the database that you want to connect to, and then click Ok. The Choose Your Database Objects page appears.
  9. In the Choose Your Database Objects page, select the tables and views that you want to use in your LightSwitch application, and then click Finish. The database, tables, and views that you selected appear in the Solution Explorer as sub nodes of the Data Sources node.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Documentation Feedback  |  Product Support Forum