Hi,
I am investigating the feasibility of converting an application written in .Net framework 2 over to .Net 5.
I have a small .Net 5 console app set up and I am trying to get a basic test application running as a POC. The code is as follows:
Sub Main(args As String())
Console.WriteLine("Hello World!")
System.Data.Common.DbProviderFactories.RegisterFactory("System.Data.OleDb", System.Data.OleDb.OleDbFactory.Instance)
RuntimeConfiguration.ConfigureDQE(Of SD.LLBLGen.Pro.DQE.Access.AccessDQEConfiguration)(Sub(x)
x.AddDbProviderFactory(GetType(System.Data.OleDb.OleDbFactory))
End Sub)
Dim dt As System.Data.DataTable = System.Data.Common.DbProviderFactories.GetFactoryClasses()
Console.WriteLine(dt.Rows.Count)
Console.ReadKey()
End Sub
The line that calls ConfigureDQE is throwing the following exception:
No DbProviderFactory has been configured for this DQE. You have to use the DQE configuration system to register at least one DbProviderFactory.
I must admit that my knowledge is limited when it comes to OleDb, Ado .Net, DataProviders etc. I am also struggling due to the fact that there are huge differences between the two frameworks with regards to configuration etc.
What I can't understand is why I am getting that particular exception - I am trying to configure the DQE system by calling ConfigureDQE to register a factory. For it to come back and tell me I need to provide a factory at that point seems absurd.
Appreciate any help.
cheers!