locked
LightSwitch and SQL Server RRS feed

  • Question

  • Short question. How do I configure LightSwitch to use the SQL Server 2008 by default? Thanks. I am going nut over this. I have stop all SQL Express services. I have change TOOLS -> OPTIONS -> DATABASE TOOLS -> DATA CONNECTION to MSSQLSERVER and I am getting this "Error 1 An error occurred while establishing a connection to SQL Server instance '.\MSSQLSERVER'. Any idea why?


    I have configured my SQL server to use mixed mode authentication and tested both modes are working.

    Friday, July 29, 2011 1:17 AM

Answers

  • The LightSwitch system needs to have SQL Express on the devleopment machine, this is used for the internals and the supporting systems it uses. You are able to use SQl Server in deployments. Even on a development machine where you connect to an external database you still need to have express running.

     


    http://www.virtualrealm.com.au - XNA Game Programming News and Resources from Downunder.
    Friday, July 29, 2011 1:22 AM

All replies

  • The LightSwitch system needs to have SQL Express on the devleopment machine, this is used for the internals and the supporting systems it uses. You are able to use SQl Server in deployments. Even on a development machine where you connect to an external database you still need to have express running.

     


    http://www.virtualrealm.com.au - XNA Game Programming News and Resources from Downunder.
    Friday, July 29, 2011 1:22 AM
  • Thanks but I hope it will be changed in the future. At least give the developers the choice to choose the SQL Servers we want.
    Friday, July 29, 2011 1:26 AM
  • Here's Beth's explanation, from this post:

    SQL Express is necessary because at development time, LightSwitch uses a User Instance of the database (this automatically attaches the database "on-the-fly" to the SQL service. Only SQL Express supports this option. If we didn't do it this way then you would not be able to easily share LightSwitch solutions with other developers or "F5" samples


    Yann

    (plus ça change, plus c'est la même chose!)

    Friday, August 5, 2011 5:20 AM
    Moderator
  • Good answer.  It is a unit of deployment.  As Beth so well put, you can pick it up and xcopy it to someone with database entact as "just another project file" more or less.  If you have to go and configure a db and change connection strings, blah, blah.  It would muddy the waters greatly.  Personally, I don't see why people ask for this.  You can deploy to where ever you like.  Why care at dev time? What is the use case?
    Friday, August 5, 2011 5:31 AM
  • It was my initial reaction though as well. "Why do I have to have another instance of SQL Server installed on my machine, I already have one", until Beth explained why it was necessary, & the benefits that we gain from having it.

    Yann

    (plus ça change, plus c'est la même chose!)

    Friday, August 5, 2011 5:35 AM
    Moderator