Ok, lets see if I can expain better, unfortunately I am somewhat of a beginner. I am using Microsoft office access 2007, using Microsoft Vista, and visual studio 2008. I am writting a program that uses a GUI to show and change a Access data base. When I first tried to run it from start without debugging, it gave me an error message that said: The Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine". After looking through articles I found a suggestion to change the configuration manager to x86. After doing this I received a new error message when I tried to start without debugging it reads:
"Could not find installable ISAM"
This is the code I have entered into form1.cs:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DB3
{
public partial class Form1 : Form
{
DataTable custDataTable;
System.Data.OleDb.OleDbConnection custConnect;
System.Data.OleDb.OleDbDataAdapter custDataAdapter;
BindingSource custBindingSource = new BindingSource();
public Form1()
{
InitializeComponent();
}
private void buttonLD_Click(object sender, EventArgs e)
{
String sqlStr = "Select * From CustomerTable";
custConnect = new System.Data.OleDb.OleDbConnection();
custDataTable = new DataTable();
custConnect.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" +
"DataSource=Customer.accdb";
custConnect.Open();
custDataAdapter = new System.Data.OleDb.OleDbDataAdapter(sqlStr, custConnect);
custDataAdapter.Fill(custDataTable);
custBindingSource.DataSource = custDataTable;
customerTableDataGridView.DataSource = custBindingSource;
}
}
}
I just can't seem to figure this out, I won't go into how many hours I have spent on this, any assistance would be greatly appreciated. Thanks