Click here to Skip to main content
15,882,209 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi guys,

I have just developed a LightSwitch app which has its database designed internally (no external data sources).

I want to make this application be installed into many pcs of the same workgroup, so ..

How can I configure the database connection string while publishing the application to make all pcs link to the same database which I will manually copy to one pc of them as a server (I will copy the auto generated LightSwitch published database to one of those pcs).

Your help will be highly appreciated

Thanks in advance
Posted
Updated 1-Sep-14 7:09am
v2
Comments
ehabelnahas 6-Sep-14 15:12pm    
OK, now I downloaded SQL Server 2014 and I followed the next steps:

1- I made a SQL Server Instance named: MYSQLserver

2- I Created a database called: MyDatabase attached to MYSQLserver

3- and already I attached a new LightSwitch project to that database as an external data source, and the connection string was:

"Data Source=EHABELNAHAS-PC\MYSQLserver;Initial Catalog=MyDatabase;Integrated Security=True"

4- Everything is ok, now I'm trying to publish the application, now what is the "How do you want to publish the default database?" for?? and what should I choose from the two options?


5- Second this is Visual Studio 2013 LightSwitch Publish wizard now asks me for three connection strings:
•Is the Attached Data Sources connection string
•Is the User connection string
•Is the Publish database Schema

I put the same connection string in all connection strings "PC\MYSQLserver;Initial Catalog=MyDatabase;Integrated Security=True" but it always give the error "An exception occurred when deploying the database for the application. Couldn't deploy package"

and when double click on it, it takes me to:

<



Target Name="DeploySchema"



Condition=" '$(ExecuteSchemaDeploy)' == 'true' ">

<



DeploySchema ConnectionString="$(PublishConnectionString)"

IncludeSecurityDBObjects="true"

ServerArtifactsFolder="$(_ServerArtifactsFolder)"



Collation="$(DatabaseCollation)"



IntrinsicDacPackageFilePath="$(_IntrinsicDacPackageFilePath)"



DatabaseProject="@(_DatabaseProjectItem)"



Inputs="@(ServerMetadataFiles)"

ProjectPath="$(MSBuildProjectFullPath)"/>




Please Help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900