我正在使用VS 2010和MS Access 2010。Microsoft Access Database engine 2010也已安装。操作系统版本为64位的Windows 7 Enterprise。
以下是我的代码,我在这里遇到了异常。同时,我也粘贴了堆栈跟踪。
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
内部异常:System.Runtime.InteropServices.SEHException(0x80004005):外部组件抛出了一个异常。在System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr,SessionWrapper& sessionWrapper)中,在System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr,OleDbConnection connection)中,在System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options,DbConnectionPoolKey poolKey,Object poolGroupProviderInfo,DbConnectionPool pool,DbConnection owningObject)中,在System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options,DbConnectionPoolKey poolKey,Object poolGroupProviderInfo,DbConnectionPool pool,DbConnection owningConnection,DbConnectionOptions userOptions)中,在System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection,DbConnectionPoolGroup poolGroup,DbConnectionOptions userOptions)中,在System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection,TaskCompletionSource
1 retry,DbConnectionOptions userOptions,DbConnectionInternal oldConnection,DbConnectionInternal& connection)中,在System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource
1 retry,DbConnectionOptions userOptions)中,在System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource`1 retry,DbConnectionOptions userOptions)中,在System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory)中,在System.Data.OleDb.OleDbConnection.Open()中,在D:\BRANSON-SVN\Solution\Branson.DataAccess\Providers\GraphTabProvider.cs的Branson.DataAccess.Providers.GraphTabProvider.GetAppDefaultOption()中:line 180,在D:\BRANSON-SVN\Solution\Branson.Controller\GraphTabController.cs的Branson.Controller.GraphTabController.GetAppDefaultOption()中:line 37,在D:\BRANSON-SVN\Solution\Branson.DCXManager\Branson.DCXManager\App.xaml.cs的Branson.DCXManager.App.OnStartup(StartupEventArgs e)中:line 174,在System.Windows.Application.<.ctor>b__1(Object unused)中,在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback,Object args,Int32 numArgs)中,在MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source,Delegate method,Object args,Int32 numArgs,Delegate catchHandler)中。