Add additional database to my application RRS feed

  • Question

  • I want to connect to a sql server database, but my current developing machine is not in the same domian with the sql server database machine. Can I connect that database without add into the same domain?
    Saturday, May 28, 2016 9:37 AM

All replies

  • You need to enable SQL Server authentication (mixed mode authentication) for the database server if it has not been enabled.

    Once you have enabled mixed mode authentication and restarted the database server, you need to add a SQL Server Login + Password. Once the Login has been created, it needs to be assigned dbo privileges for the database you want to use. You will use SQL Server Authentication + Login + Password in the publish wizard instead of Windows Authentication.

    Search the internet for "create sql server user" or "create sql server login" for more detailed documentation and instructions.

    Saturday, May 28, 2016 7:13 PM
  • Thanks for lan E's help.

    Hi StandInWater,

    Please enable your SQL Server authentication can be login with user name and password first as lan E's suggestion.

    Then please try with following steps to connect to the SQL Server Database from LightSwitch application. If any problem, please feel free to come back.

      • In Solution Explorer, click the Data Sources node.
      • On the Project menu, click Add Data Source. It will appear Attach Data Source Wizard window.
      • In the Choose a data Source Type page, click Database, and then click Next.
      • If the Choose Data Source dialog box appears, click Microsoft SQL Server, and then click OK.
      • In the Connection Properties dialog box, make sure that Microsoft SQL Server (SqlClient) appears as selected in the Data source box.
      • 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.
      • If your database is set up to use 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.
      • Click Select or enter a database name. Then, in the Select or enter a database name 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.
      • 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.

    Best Regards,

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Sunday, May 29, 2016 2:20 AM