Can't open .MDB database
Hello,
I am a beginning programmer. Problem:
I am trying to open a Microsoft ACCESS database using OLEDB. The exception raised when trying to open the .MDB is "database is not registered on this machine"
Here is the code I am using:
using System;
using System.Data;
using System.Data.OleDB;
namespace Wrox.BeginningCSharpDatabases.Chapter05
{
class Connection_OleDB {
static void Main()
{
OleDBConnection thisConnection = new OleDBConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=c:\Northwind.MDB");
// Open connection
thisConnection.Open();
}//end Main
No access databases will open. I am able to open SQL databases (by changing appropriate references)just fine.
How do you register an Access database on the local (or) remote machine???
Thanks so much in advance,
Baffled,
Saxitalis
|