Click here to Skip to main content
16,016,425 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more: , +
I have developed an application in Visual Studio 2012 with a SQL Server 2012 database. When I try to publish the application to test it, it works correctly on my machine (that includes the database in a SQL Server data folder), but when I move that published app to another machine it doesn't work.

I want to know the simplest way to deploy the project together with its database. I have seen a solution to integrate the SQL database with my application is to use a localdb but I don't understand the steps to use it. I need all the steps to deploy an application with a SQL Server 2012 database in order to install the application on another PC without having to install SQL Server 2012 on that PC.
Posted
Updated 10-Jun-15 15:07pm
v2
Comments
njammy 10-Jun-15 20:45pm    
Do you have access to a SQL Server instance? Ideally you should create scripts from your localdb mdf database (manually or via SSMS) and run on the live server.
Then point the app to the new db on live, using app.config connection strings.
PIEBALDconsult 10-Jun-15 21:08pm    
Is it a multi-user application? If it is, you don't want localdb.
[no name] 17-Jun-15 2:32am    
Nice post

1 solution

Your appliction needs to connect to some DB. There is no way that you will deploy without SQL DB on another system or you need to have SQL DB somewhere in the cloud to connnect from all the other systems.

I advice you to switch to file based DB as MySQL then you will deploy with single file and it will work.
 
Share this answer
 

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