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.0Overrides error wonOverrides error won't let me build
Previous
 
Next
New Post
5/28/2007 11:07 AM
 

I'm trying to add another method to my DataProvider class in a custom 4.5.1 module like this:

DataProvider.vb

        Public MustOverride Function UpdateFeederLatest(ByVal ItemID As Integer, ByVal ItemTitle As String, ByVal ItemDate As String) As Integer

I also add this it SqlDataProvider:

        Public Overrides Function UpdateFeederLatest(ByVal ItemID As Integer, ByVal ItemTitle As Integer, ByVal ItemDate As String)
            Return Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, GetFullyQualifiedName("UpdateFeederLatest"), ItemID, ItemTitle, ItemDate))
        End Function

However, it won't allow me to build.

I always get this error message:

"function "UpdateFeederLatest" cannot be declared 'Overrides' because it does not override a function in a base class"

This is very odd, because I've added it to the DataProvider along with the other abstract methods.

Can anyone help me out with this? I have no idea what's causing it.

 


Steve White
 
New Post
5/28/2007 12:09 PM
 

Check to see if your SqlDataProvider project is referencing a local assembly file instead of the project. If this is true, possibly the assembly file referenced is older and does not have the newly added method which would cause the described behavior.

Nik

 


Nik Kalyani
Co-founder
DotNetNuke Corporation
Blog | Twitter | FaceBook
 
New Post
5/28/2007 12:20 PM
 

Thanks Nik.

I don't have a separate SqlDataProvider project. I'm trying to build my first module using this method:

http://www.adefwebserver.com/DotNetNukeHELP/DNN4_WAP/

All it does is add a SqlDataProvider.vb class and a DataProvider.vb class. Would this be caused by some weird VS2005 caching problem as logically it makes no sense to me.


Steve White
 
New Post
5/28/2007 12:28 PM
 

The two methods have different signatures due to the ItemTitle parameter being a String in the DataProvider and an Integer in the SqlDataProvider. Easy to mistype - I've done worse!


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
5/28/2007 1:21 PM
 

Bill, you're a star. Can't believe I missed that!

Much appreciated, it builds fine now.


Steve White
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Overrides error wonOverrides error won't let me build


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