views:

88

answers:

5

i want the most simple example from scratch how to

  1. open new db

  2. populate it with one table

  3. connect and open it to simple select query

I have been looking for sothing relvant in the last 2 days please help me i neede just the basic

I am using visual studio 2008/2010 and i know mysql but dont know how to use VS for DB


I would prefer example using ADO.NET

A: 

There are tons of ways to do that.

Have a look at ADO.NET, LINQ2SQL, Entity Framework, NHibernate ....

You can find a lot of examples in internet.

Incognito
there is no example from zero to max i am intrested to work in wpf ising sql quires do you recomend on somthing ? i have heard that ADO.Net is the most common do you have soe articale about it ?
yoav.str
everyone tries to start by understanding from a point he has already a working db i want to see how to declare and do everything ... I don't find examples who matches this scenario
yoav.str
Any particular reason to down vote ?
Incognito
@yoav.str what you have tried so far ? Just google "ADO.NET select".Here what it comes in first http://www.java2s.com/Code/CSharp/Database-ADO.net/illustrateshowtoperformaSELECTstatementusingADONET.htm.And you can also find a lot of examples in MSDN.
Incognito
i want to start from zero no db to make my own db your example does'nt qualify this need thank you for anwsering but it's not what i am looking for ...
yoav.str
+1  A: 

If you want to stick with MySQL and C#, this PDF will walk you through the process.

http://dev.mysql.com/tech-resources/articles/Beginning_MYSQL_5_with_Visual_Studio.NET_2005.pdf

JohnK813
A: 

hi there my personal preference would be to use pgsql server and npgsql.dll. the link to pgsql is here and just google npgsql.

these are the best documented fastest and easiest to use databases i have found (that is an opinion open to suggestions)

A: 

I've been in the same situation, just finding my feet with ADO and .Net database handling in Visual Studio. Up to now I'm finding that some of the most useful guides are:

the_mandrill
+1  A: 

If you're just getting a start on things, check out the ASP.Net tutorial on building a Data Access Layer using TableAdapters. This is a great start because it gives you a nice drag and drop type interface for a lot of things, in addition to giving you strongly typed data. All the concepts of data adapters and connection strings are there, just managed by the object it creates.

The nice thing about the Table Adapters is that it leverages ADO.Net so you simply have to replace your DataAdapter with SQL, MySQL, SQLite adapter you need.

Once you get the hang of that, you can move into integrating your Business layer as well through the LINQ to SQL tutorials.

Dillie-O