Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Need Some VB Programming GuidanceNeed Some VB Programming Guidance
Previous
 
Next
New Post
8/28/2009 2:55 PM
 

Wonder if someone can point me in the right direction. I'm not much of a programmer and I have inherited a DNN website that has some programming issues. A prior developer created this DNN website and in addtion, created a VB project to extend some functionality within the website. The extended functionality primarily involves connectivity to another SQL Server database (not the database used by DNN). In the VB project, there are these references:

  • Contacts.dll
  • DotNetNuke.dll
  • Microsoft.ApplicationBlocks.Data.dll
  • And several System.<namespace> references

The VB project compiles error-free, but I am getting a warning, and do not know how to resolve the warning. The warning is as follows:

Warning 'SqlDataProvider' is not CLS-compliant because it derives from 'DataProvider', which is not CLS-compliant.

The warning points to a command-line near the top of the project. It is the 6th line down within the project:

    Imports System
    Imports System.Data
    Imports System.Data.SqlClient
    Imports Microsoft.ApplicationBlocks.Data
    Namespace Contacts
        Public MustInherit Class SqlDataProvider
            Inherits Contacts.DataProvider

The warning underscores the SqlDataProvider class name. I don't understand how to resolve the warning. If I go ahead and try to view the web page that uses the funtionality within the VB Project, it displays the following error on the page, which I think may go away if I can resolve the warning:

    Error: Unable to load the form. Please try it later.
    DotNetNuke.Services.Exceptions.ModuleLoadException:
    Cannot create an instance of Contacts.SqlDataProvider because it is an abstract class.
    ---> System.MemberAccessException: Cannot create an instance of Contacts.SqlDataProvider because it is an abstract class.
    at System.Reflection.RuntimeConstructorInfo.CheckCanCreateInstance(Type declaringType, Boolean isVarArg)
    at System.Reflection.RuntimeConstructorInfo.ThrowNoInvokeException()
    at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
    at Contacts.DataProvider.Instance()
    at Contacts.CodeRegionController.GetByCountry(String country)
    at Contacts.Contactform.formDataInput()
    at Contacts.Contactform.Page_Load(Object sender, EventArgs e)
    --- End of inner exception stack trace ---

How can I prevent this warning?

Thank you - Steven

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Need Some VB Programming GuidanceNeed Some VB Programming Guidance


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out