data transfer between light switch database and sql server database
-
Tuesday, March 06, 2012 7:34 AM
Hi
I have created a light switch application with internal database(the one which lightswitch creates). Then in web.config file I have changes the connection string from internal to my local sql server database in the ServerGenerated project. My query is as I have changed the connection string, at what point of time this data transfers from lightswitch local database to sql server.
All Replies
-
Tuesday, March 06, 2012 3:49 PM
lightswitch manages the intrinsic ("internal") database and doesn't want you changing it. when you publish the application, we will create a new database for you that matches the schema of the internal database.
if you want to manage your database yourself, you need to attach to it with lightswitch.
- Proposed As Answer by Matt Evans - VSLSMicrosoft Employee Tuesday, March 06, 2012 3:49 PM
-
Tuesday, March 06, 2012 5:43 PM
So you mean to say that, when I publish a light switch application with intrinsic database, at that point data is moved from ApplicationData.mdf file to the SQL Server specified in the connection string in the publish wizard?
Also, what is the solution if i had earlier created the light switch application using intrinsic database, but now I want my data to be stored in SQL Server?
-
Tuesday, March 06, 2012 6:47 PM
There will be never a "transfer of data".
The connection string used during publish, is used for setting up the database scheme on the targer server.
If you want to transfer data from the local db on your development machine to the target db, you will have to do manualy (by means of sql scripts).
paul van bladel
- Marked As Answer by AnuragMathur Monday, March 12, 2012 6:06 PM
-
Sunday, June 24, 2012 10:02 PMCan you point to a bare bones example (say, in C#) on how to transfer data from the local db to the deployment target?

