You want to retrieve data from a database and output it unto a windows form control or what?..If thats what you want to do then you'd have to do the following..
1. first create your table in an Access database (either 2003/2007).
2. Now you can use the following code to get the data you need
using System.Data;
using System.Data.OLEdb;
using System.Windows.Forms;
..
class DB
{
public void getData([form controls here as parameters eg.] Textbox tbxFname, Textbox tbxLname)
{
OLEdbConnection conn=new OLEdbConnection();
conn.ConnectionString="Provider=Microsoft.JET.4.0; Data Source=[database name here].mdb(if access 2003)/.accdb(if access 2007)";
OLEdbCommand cmd=new OLEdbCommand();
cmd.Connection=conn;
cmd.CommandType=CommandType.Text;
cmd.CommandText="select * from [table name here] where [specify condition here]";
OLEdbDataReader rd;
rd=cmd.ExecuteReader();
while(rd.Read())
{
tbxFname.Text=(rd[0].Value).toString();
tbxLname.Text=(rd[1].Value).toString();
.....
}
conn.Close();
cmd.Dispose();
}
}
To call the code on the form,
1. First create an object to the class in the form_load event, Example :
DB _object = new DB();
_object.getData([input argument list here]);
And when you build the Project I think it should work after you make the right changes!