views:

90

answers:

6

Hi all, i have just started using visual studio 2008.I am working on c#.

I want to add SQL database particularly LOCAL database (.sdf) to my project and want to use queries which will save data in database and fetch some data from database and which will display and will perform different function.

So, if any body can give me any small tutorial or link that what are various types of databases i can use along with visual studio and and how will i be able to use it.

Any general tutorial will do.

Thanks a lot.

Regards,

A: 

Google for Ado.Net Tutorials.

1 See Here

saurabh
+4  A: 

Hello,

Don't use .sdf databases. I've worked with it but it was confusing. I was not able to use WHERE statements....

Use SQLite instead.

That is THE Solution.

Download SQLite here Another tutorial

Gerben Limburg
u can add those links in comments !!!
Sangram
My reputation was too low for more than one link. After the votes my reputation was high enough for more links. Thank you for voting..
Gerben Limburg
A: 

I recommend you the use of SQLite

Albert Asensio
u should write something more dude !!!!! n y sql lite only???
Sangram
+1  A: 

Not sure why Gergen was unable to perform where statements. One issue I had with Compact edition was that I couldn't create stored procs or views. I don't have much experience with SQL Lite, so I can't give an opinion on that.

If you are doing web based stuff (i.e., asp.net), I found the following series a good introduction to database stuff: Data Access Tutorials

As for what database to use, as long as there's a provider for it, working with it via ADO.NET (or entity framework, or whatever) should be similar. If you are just starting, I'd probably recommend staying with the Compact Edition since most examples/tutorials you'll see will involved SQL Server.

Bryce Fischer
A: 

For simple Local SQL database stores, there are quite a few solutions. A good full comparison can be found on from Wikipedia

SQL Express 2008

Out of process, runs as a windows service, supports stored procedures and views and does pretty much everything SQL standard does with few limitations. 50MB install.

Ideal for anything but large SQL deployments.

Loads of how to guides for SQL Express

SQL Compact Edition 3.5 (.sdf files)

In process, the code for accessing the database runs within the same process as your application. Ideal for embedded systems (point of sale, ATM, in-car systems etc...). Microsoft's equivilent to SQLite. Very small install (easy to deploy with app).

Getting started guide for SQL Compact Edition and a load of HowTos to get you going

SQLite

The non-Microsoft answer to an in process database. Pretty much the same functionality as SQL Compact Edition apart from it's a smaller install (300kb for SQLite vs. 2MB for SQL Compact edition), it supports larger database files (32TB for SQLite vs. 4GB for SQL Compact edition).

SQLite getting started article

badbod99