Reputation: 9634
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
Upvotes: 7
Views: 21077
Reputation: 9563
Sql Server Compact is a great embedded database. It is also fully documented on MSDN, see System.Data.SqlServerCe Namespace.
You can easily create and modify databases programatically, see SqlCeEngine.CreateDatabase Method.
You can download it on the SQL Server Compact Download Page.
Upvotes: 0
Reputation: 2758
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:
Upvotes: 3