3

I'm new to publishing, and google wasn't very helpful, so I'm asking here.

I have created a WPF application that uses Microsoft SQL Server Management Studio for the database. I have created a setup for the program, and have tested it on another PC, and it doesn't work since the other PC doesn't have SQL Server.

Is my only solution to install SQL Server on every other PC, or is there something I missed in publishing section of Visual Studio? Or is there any way I can create a setup that includes the database in it?

5
  • 2
    If your application uses MS SQL, how do you think it will be able work on a PC that doesn't have MS SQL installed? If your application needs it then yes any pc running your application will have to have SLQ server installed. Commented Aug 19, 2016 at 12:45
  • 1
    okay, so I am in a bind, but is there any way i can fix it now, without losing all of the data, or do I have to start over? Commented Aug 19, 2016 at 12:50
  • 2
    Is yours a standalone app where you would have individual installations and each would have their own database? Or is your intent to install the app but have a common central database? If it's the latter, then you'll want/need to have a SQL Server instance installed somewhere, usually on a central server. Commented Aug 19, 2016 at 13:03
  • 1
    well i planned on having a standalone app, with a CD installation, or a USB installation, at first I thought that it would just install the database onto the PC and use it from there, but I was foolish to think so! And yeah, every other installation would use its own database. based on original! Commented Aug 19, 2016 at 13:14
  • 1
    What kind of data are you storing in the database? It might be overkill to use a full MSSQL Database for a standalone application. Often XML or a serialized binary storage is quite enough. Commented Aug 19, 2016 at 15:43

1 Answer 1

1

It sounds like you might want to look into SQL Server Express. It's designed to be a lighter-weight SQL Server intended to be included with apps that sound like yours. If you've already developed a database using a standard SQL Server installation, you should be able to import the data into Express and then include that in your project. I haven't actually done it before, but I think when you create your app installer you can have an option to include the setup for SQL Server Express if it's part of your project.

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

2 Comments

So if I change my database source from SQL Server to SQL Server Express, won't it lose that data in the App? How will the computer know that i switched from one to another? sorry for the question barrage, it's my first time doing this! :)
If you install SQL Server Express alongside your already-installed SQL Server, you should be able to connect to both via SSMS. From there you should also be able to backup the SQL Server database, and restore it to SQL Server Express, effectively transferring the data. Or, you could manually script the data from one to the other, too.

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.