0

EDITED FOR CLARITY: I am writing a winforms application for desktop that relies on a database to fill it's information. I would like to include the files that hold that data in the deployed application so that it can be installed on a user's computer so that they can use the data locally instead of across the internet.

ORIGINAL POST: I am writing a Desktop application that makes use of SQL Databases. I want to be able to package it up with the database files and have it work when someone installs it. Is there some way to do this with VS17? Or Should I just work with an XLS file from Excel?

I'm using Visual Studio 2017. I have done a google search that responded with installing SQL this and that but nothing relating to VS17. My stack overflow search pulled up one result that I thought was relevant, that suggested installing sqlite without any other elaboration.

When I installed and ran on my computer, it worked, but I believe that is because I have the database service running on my machine since this is where I code and test the application through VS. I had an associate run it and it gives them an error:

Cannot find directory or file

EDIT: The replied i am getting seems to be all about installing a SQL Server. I am looking to make sure the project deploys the Database files, not the server.

Ingram Yates
  • 89
  • 1
  • 10
  • https://stackoverflow.com/questions/32956142/how-to-deploy-application-with-sql-server-database-on-clients – Dale K May 19 '19 at 23:36
  • 1
    Possible duplicate of [How to deploy application with sql server database on clients](https://stackoverflow.com/questions/32956142/how-to-deploy-application-with-sql-server-database-on-clients) – Ken White May 19 '19 at 23:37
  • 1
    A SQL Server database is an MDF file and you can include the MDF file when publishing. – jdweng May 19 '19 at 23:53
  • @jdweng How would i go about doing that? – Ingram Yates May 20 '19 at 00:07
  • Hover your mouse over the `sql-server` tag in your question and tell us which SQL Server you are using. Why do you not want to deploy SQL Server? – Dour High Arch May 20 '19 at 01:04
  • it looks like i am using SQL Server 2008. It's not that i don't want to deploy SQL Server, I believe that i have that set up right in the prerequisites. I am trying to make sure that the program takes with it the fully set up database that holds all the tables that it will be using. – Ingram Yates May 20 '19 at 01:20
  • Where are you going to deploy the files _to_? Are you going to use LocalDB? Assuming that the end user is going to have the ability to copy the files to a SQL Server instance? – alroc May 20 '19 at 01:32
  • the intention is that the program will deploy with and install SQL server express.The database files would be deployed to that SQL server and run native on the client machine. – Ingram Yates May 20 '19 at 01:52

0 Answers0