Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a simple Local SQL database & insert values into it using C#?

How to create a simple Local SQL database & insert values into it using C#? can any one provide me a sample code or project link.. i googled a bit, i am not getting how to do.. if you can advice it would be great

like image 661
Naruto Avatar asked Feb 10 '11 10:02

Naruto


2 Answers

If you are creating a Desktop application, you can create a local Sql server Ce (Compact edition) database.

When you install Visual C# 2008 Express, It will automatically install SQL Compact 3.5 on your box.

Here is an excellent Getting started tutorial on the topic:

http://dotnetperls.com/sqlce

like image 88
Raghu Avatar answered Sep 28 '22 15:09

Raghu


I would use SQLite. It's simple and it doesn't need any kind of installation, the full database it's only a file.

like image 30
Rodrigo Avatar answered Sep 28 '22 15:09

Rodrigo