i have to get began with being able to access a database with c#

please produce the easiest example possible!!

possibly a mysql database will be the easiest example?

please show me how you can connect with a mysql database and obtain data

If you wish to use MySQL, you may require a .Net Data Provider for MySQL or perhaps a MySQL ODBC driver.

Or you might install SQL Server Express Edition (free download).

Then just walk-through a novice tutorial, which you will find plenty on the internet: MSDN tutorial here, one here, another here, and here is a simple MSDN sample covering ADO, ODBC, OleDB.

Really there's an enormous insightful help there.

This can be a decent example of being able to access databases insinternet from first concepts.

Scott Guthrie authored a really nice (and lengthly) tutorial on data access using ASP.Internet.

To help keep things simple, you only have to consider the following:

  1. tutorial 1 - concentrate on option 2
  2. tutorial 2 - skip the part about advanced options

Guthrie provides code in VB.Internet. I'll rewrite the code in C# (that ought to go inside the scope from the Page_Load method under Default.aspx):

NorthwindTableAdapters.SuppliersTableAdapter suppliersAdapter = 
    new NorthwindTableAdapters.SuppliersTableAdapter();

Northwind.SuppliersDataTable suppliers = suppliersAdapter.GetAllSuppliers();

foreach (Northwind.SuppliersRow supplierRow in suppliers)
    Response.Write("Supplier: " + supplierRow.CompanyName + "<br />");

Incidentally, the whole tutorial may be worth reading through.