Error in Database Access :
"The type initializer for 'MyCompany.Modules.Search.DataProvider' threw an exception."
1) Make sure that both the sqlDataProvider class and the DataProvider class are in the same namespace.2) Verify those namespaces using the object browser in visual studio3) Verify that the solution outputs the dlls for both the module and data provider projects to the dotNetNuke bin directory4) the CreateObject call in the dataProvider class should be as follows:
CreateObject("data", "< NAMESPACE OF DATAPROVIDERS >", "< NAME OF MODULE DLL >", DataProvider)
Where the following explainations apply:
< NAMESPACE OF DATAPROVIDERS > = The namespace of the dataprovider class in the module project and the namespace of the sqldataprovider class in the dataProvider project (they should be in the same namespace).
< NAME OF MODULE DLL > = This is the name of the module dll that should be compiled into the dotNetNuke bin directory when the project is built (minus the ".dll" extension).