1

I like to use an database for my program, and I ran into SQLite.

At my first look, SQLite looks great. But there's only one thing.

I don't want that users must install SQLite in order to run the program.

Now did I see that I can download the source code of it.

So my question to you guys is... Can I compile the SQLite server into my program, and then use the server like normal? And when you stop the program, the server stops also??? Is this possible?

Thanks in advance

3 Answers 3

2

SQLite doesn't use a server, it's just a DLL reference and a shared file format. It is the best choice for what you are trying to do.

Check this library out: http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki , http://sqlite.phxsoftware.com/

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

7 Comments

so if i understand it right.... I can use the System.Data.SQlite, and an db file, and everything works just fine???
Yep! It's that easy :) I've used this a lot and it's surprisingly fast and you even get features like journaling and transactions. It's perfect for small projects where you don't want to be intrusive to the client machine.
Sounds nice, Thanks you for the clear answer and the links ;-)
And what version (download link) would you suggest if i want to keep the program 32 bit and 64 bit compatible? (windows)
That depends on your target system. If you don't plan on using more than 4 GB of ram you can use the 32-bit one and it'll run on 64-bit as well. You can also use any CPU to compile and add the 32-bit one.
|
2

There is no such concept like SqLite server.

For deploying SqLite, to client machine for you it's enough to deploy C# drivers to be able to connect to that DB (you can download them from here), and DB file itself (in case when you don't create it at runtime).

In other words, there is nothing to install, there is no any service to start.

Comments

-1

What you are looking for is an "Embedded Database".
SQL Server Express can be embedded, so that your users don't need to install the server. They will just need the data file.

1 Comment

SQLite is far better and more portable than SQL embedded or LocalDB.

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.