2

This is my situation: I want to make a small application in C# using SQL server, but I don't want it to be a server based application...

I simply want a database that I can copy and paste into my application folder and reference it there, then use the application on any other PC that wont have SQL Server installed...

3 Answers 3

4

You can't do that with SQL Server database. You can use Microsoft Access database or SQLite for this purpose or you can use SQL Server CE.

See: How to: Deploy a SQL Server Compact 4.0 Database with an Application

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

3 Comments

Very close to -1 for recommending JET/ACE as an "answer" to anything. And since he's trying to avoid installing SQL Server, I doubt he wants Access installed in one way or anything. Which leaves JET, which is x86 only. And crap.
@ta.speot.is, actually YES. SQLite or CE should be the option
Thanks for the answer, I decided to just bite the bullet and go for mySQL. Which is easy to install and free, and does the job.
1

You can use embedded solution such as SQL SERVER CE. Look at this

Comments

1

You can use SQLite or Microsoft LocalDb which are both filebased and you can copy/paste and you're done.

For compatibility with SQL Server, Microsoft LocalDb is your winner, in the sense that if you want you can switch connection strings to a fully fledged SQL Server that has the same schema and it will work.

If you don't need that then SQLite is a lightweight and sufficient choice, there is a free Ado.net provider for it, you can use it with EntityFramework, absolutely no problem, just don't expect it to work Model-first or Code-first. You will have to go Database-first.

4 Comments

Beat me to it! I was going to suggest this!
-1 "any other PC that wont have SQL Server installed" LocalDB has to be installed.
@ta.speot.is - sorry, Windows 8 comes with it preinstalled :D, of course not all computers will have Win 8 but hey, look to the future right?
"sorry, Windows 8 comes with it preinstalled :D" No it does not.

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.