1

I have develop a desktop application in .NETFramework, Version=v4.5 using visual studio and database using SQL sever express 2014. My app is ready. Now I have to install it on client machine. how can i create database there?

which features of SQL express i have to install on client machine?

Please provide me an easy solution.

18
  • 1
    use a MDF file, that's small and better way to deploy desktop app. Commented Aug 22, 2017 at 7:26
  • 1
    which ever ones you use! Commented Aug 22, 2017 at 7:26
  • a database for a desktop app? Commented Aug 22, 2017 at 7:29
  • 1
    If you need a database locally which will not be accessed by other machines then maybe SQLite is a better approach? Commented Aug 22, 2017 at 7:30
  • @MarcoSalerno Why not? How else would you deal with having to keep a lot of data? Commented Aug 22, 2017 at 7:42

3 Answers 3

1

You can use following strategy to make it work.

Copy the database file from program Files to AppData on installation of the software. You can't modify the files in Program Files that's why you need to have it in AppData.

Sign up to request clarification or add additional context in comments.

Comments

0

From the developer machine, create a backup file of the database and use this backup to restore the db on the client machine. The client machine will need to have SQL Server Express installed and you will need to adjust the connection string accordingly.

Comments

0

Creating a backup as mentioned above is simplest.

I've found it helpful (as I develop) to maintain a TSQL script. The script will drop the tables and indexes...recreate and even populate.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.