I followed this tutorial and that's what I got.
http://msdn.microsoft.com/en-us/library/ms227647v=vs.80.aspxNot sure why the tutorial told me to do all those when I could just write this in my Form1.cs and it still works perfectly.
Code
OleDbConnection con = new OleDbConnection();
private void btnLoadRecords_Click(object sender, EventArgs e)
{
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myprojectname\\xtreme.mdb";
con.Open();
DataSet ds = new DataSet();
DataTable dt = new DataTable();
ds.Tables.Add(dt);
OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM CUSTOMER", con);
da.Fill(dt);
dataGridView1.DataSource = dt.DefaultView;
con.Close();
}
This post was edited by JuicyFruitSweeT on Oct 16 2012 06:49pm