G
Guest
Hi;
I have the following code:
DataTable table = DbProviderFactories.GetFactoryClasses();
foreach (DataRow row in DbProviderFactories.GetFactoryClasses().Rows)
DbProviderFactory providerFactory = DbProviderFactories.GetFactory(row);
The DbProviderFactories.GetFactory(row) throws an exception when the row has
the values: "SQL Server CE Data Provider", ".NET Framework Data Provider for
Microsoft SQL Server 2005 Mobile Edition", "Microsoft.SqlServerCe.Client",
"Microsoft.SqlServerCe.Client.SqlCeClientFactory,
Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91"
The exception is:
System.Configuration.ConfigurationErrorsException was unhandled
Message="Failed to find or load the registered .Net Framework Data
Provider."
Source="System.Data"
BareMessage="Failed to find or load the registered .Net Framework Data
Provider."
Line=0
StackTrace:
at System.Data.Common.DbProviderFactories.GetFactory(DataRow
providerRow)
at DbTest.Program.Main(String[] args) in
c:\src\MyWordAddin\DbTest\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
What is going on?
I have the following code:
DataTable table = DbProviderFactories.GetFactoryClasses();
foreach (DataRow row in DbProviderFactories.GetFactoryClasses().Rows)
DbProviderFactory providerFactory = DbProviderFactories.GetFactory(row);
The DbProviderFactories.GetFactory(row) throws an exception when the row has
the values: "SQL Server CE Data Provider", ".NET Framework Data Provider for
Microsoft SQL Server 2005 Mobile Edition", "Microsoft.SqlServerCe.Client",
"Microsoft.SqlServerCe.Client.SqlCeClientFactory,
Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91"
The exception is:
System.Configuration.ConfigurationErrorsException was unhandled
Message="Failed to find or load the registered .Net Framework Data
Provider."
Source="System.Data"
BareMessage="Failed to find or load the registered .Net Framework Data
Provider."
Line=0
StackTrace:
at System.Data.Common.DbProviderFactories.GetFactory(DataRow
providerRow)
at DbTest.Program.Main(String[] args) in
c:\src\MyWordAddin\DbTest\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
What is going on?