I am using VS 2010 with MS Access 2010. Microsoft Access Database engine 2010 is also installed. OS version is Window 7 Enterprise with 64 bit Operating system.
Below is my code where i am getting the exception. Also i paste the stack track.
DCXManagerTableAdapters.AppDefaultOptionTableAdapter dataAdapter = new DCXManagerTableAdapters.AppDefaultOptionTableAdapter();
dataAdapter.Connection.ConnectionString = DB.ConnectionString;
if (dataAdapter.Connection.State == ConnectionState.Closed)
{dataAdapter.Connection.Open();} \* Here i am getting exception
Inner Exception: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. at System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource
1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at Branson.DataAccess.Providers.GraphTabProvider.GetAppDefaultOption() in D:\BRANSON-SVN\Solution\Branson.DataAccess\Providers\GraphTabProvider.cs:line 180 at Branson.Controller.GraphTabController.GetAppDefaultOption() in D:\BRANSON-SVN\Solution\Branson.Controller\GraphTabController.cs:line 37 at Branson.DCXManager.App.OnStartup(StartupEventArgs e) in D:\BRANSON-SVN\Solution\Branson.DCXManager\Branson.DCXManager\App.xaml.cs:line 174 at System.Windows.Application.<.ctor>b__1(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)