How to create a simple local SQL database and insert values ​​into it using C #?

How to create a simple local SQL database and insert values ​​into it using C #? can someone provide me with a sample code or a link to the project .. I ruined a little, I do not understand how to do this. if you can advise it would be great

+7
source share
3 answers

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

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

Here's a great tutorial on getting started:

http://dotnetperls.com/sqlce

+3
source

I would use SQLite . It is simple and does not require any installation; a complete database is just a file.

+2
source

Sql Server Compact is a great built-in database. It is also fully documented on MSDN, see System.Data.SqlServerCe Space .

You can easily create and modify databases programmatically, see the SqlCeEngine.CreateDatabase Method .

You can download it from the SQL Server Compact Download page.

0
source

All Articles