Creating a new DNN module with SQL database connections I observed the error: SqlHelper’ is not declared, when compiling the SqlDataProvider project.
The full SqlDataProvider, SqlHelper’ is not declared, error details are:
Error 8 'SqlHelper' is not declared. It may be inaccessible due to its protection level. C:\inetpub\wwwroot\dnn7\website\DesktopModules\VNTweb\MyProject\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb 136 26 MyProject.SqlDataProvider
Reviewing the SqlDataProvider.vb file (associated with the SqlDataProvider project I found a spelling error in the imports reference for Microsoft.ApplicationBlocks.Data. Given below are the imports used.
Within the Project definition the Resources defined are as below
| Reference Name | Type | Version | Copy Local | Path |
|---|---|---|---|---|
| DotNetNuke | .NET | 7.4.0.353 | False | C:\inetpub\wwwroot\dnn\bin\DotNetNuke.dll |
| Microsoft.ApplicationBlocks.Data | .NET | 4.0.0.0 | False | C:\inetpub\wwwroot\dnn\bin\Microsoft.ApplicationBlocks.Data |
| MyProject | .NET | 7.4.0.353 | True | C:\inetpub\wwwroot\dnn\DesktopModules\VNTweb\MyProject\bin\VNTweb.MyProject.dll |
| System | .NET | 4.0.0.0 | False | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll |
| System.Core | .NET | 4.0.0.0 | False | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll |
| System.Data | .NET | 4.0.0.0 | False | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll |
| System.Data.DataSetExtensions | .NET | 4.0.0.0 | False | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll |
| System.XML | .NET | 4.0.0.0 | False | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.XML.dll |
| System.XML.Linq | .NET | 4.0.0.0 | False | C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.XML.Linq.dll |
For the SqlDataProvider file the imports are defined as:
Imports System Imports System.Data Imports System.Data.SqlClient Imports Microsoft.ApplicationBlocks.Data Imports DotNetNuke Imports DotNetNuke.Common.Utilities


