Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Firstly you need to know, how to make an <a href="http://csharp.net-informations.com/data-providers/csharp-oledb-connection.htm" rel="nofollow noreferrer">OleDbConnection</a> in C#.</p> <p>you don't need to create variables!. You can directly assign all your rows or the selected one to one of the many datacontrols available in ASP.NET and winforms both. </p> <p>DataControls automatically show your db.table data in a tabular layout on a page or a form. you can also control the look of this automatically created layout.</p> <p>you can fetch your data from the db and create a dataset like this:</p> <pre><code>string query = "SELECT * from Table1 WHERE ID=?"; OleDbConnection odc = new OleDbConnection(strConn); odc.Open(); OleDbDataAdapter dAdapter = new OleDbDataAdapter(); OleDbCommand cmd = new OleDbCommand(query,odc); cmd.Parameters.Add("?", OleDbType.BSTR, 5).Value ="asdf"; dAdapter.SelectCommand = cmd; ds = new DataSet(); dAdapter.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; </code></pre> <p>now in above code, <code>strConn</code> is the connectionString to the access db file. every kind of storage requires a unique kind of connectionstring. you can find out the one suitable for you <a href="http://connectionstrings.com/" rel="nofollow noreferrer">here</a>.</p> <p>Once you are clear with that. you need to learn about <a href="http://www.asp.net/web-forms/overview/aspnet-data-controls" rel="nofollow noreferrer">ASP.NET DataControls</a> and winforms <a href="https://stackoverflow.com/questions/367559/good-datagridview-tutorial">dataGridView</a> and many others.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload