The error falls here:

dataAdapter.Fill(ds, "BookStore"); 

What is the reason?

 public partial class Form1 : Form { public string CmdText = "SELECT * FROM BookStore"; public string ConnString = "Provider=Microsoft.ACE.OLEDB.12.0;DataSource=D:\\Database1.accdb"; public Form1() { InitializeComponent(); OleDbDataAdapter dataAdapter = new OleDbDataAdapter(CmdText, ConnString); DataSet ds = new DataSet(); dataAdapter.Fill(ds, "BookStore"); dataGridView1.DataSource = ds.Tables[0].DefaultView; } private void Form1_Load(object sender, EventArgs e) { } } 
  • What is BookStore? Normal table or link to an external file? Not this problem is the case: jonwilliams.org/wordpress/2014/03/21/… - MSDN.WhiteKnight
  • @ MSDN.WhiteKnight, table in the database - Awesome Man

0