Using BeforeSave Event in Web Application


Author
Message
Cyrus Welch
Cyrus Welch
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)
Group: Forum Members
Posts: 20, Visits: 82
I'm trying to use the before save event in a web application to log changes to the database.  I need to be able to access this from the application base page so I have access to the session and other application settings as well as my application's transaction log table.  It's working, however I get an error when building (which doesn't stop it from working, it's just very annoying at this point)

"Error 104 Method 'Private Sub snpccore_BeforeDelete(e As MicroFour.StrataFrame.Business.BeforeDeleteEventArgs)' cannot handle Event 'Public Event BeforeDelete(e As MicroFour.StrataFrame.Business.BeforeDeleteEventArgs)' because they do not have the same signature. C:\projects\MetSYSDotNet\MetSYSDotNet\App_Code\MetSYSSnapShotBasePage.vb 165 121 C:\...\MetSYSDotNet\"

I get the same error showing in the editor for each line as well.  I'm not sure why it thinks that the signature is not the same since it clearly is since it's clearly working (the event is getting called and it's properly calling the method I've set up with the object reference and such so I can parse and log all the data changes and they are indeed being logged properly). 

As I said, the build succeeds, unless there is ANOTHER error, in which case it's really painful to find the real error in all the other stuff.  I'm also getting the same issue with the BeforeDelete event which I'm using the log deletes as well, but I figure it's going to be the same issue.

BTW this is with version 1.6 and upgrading to the latest version isn't a option for a few days as the boss wants to get this version out the door in about 4 days.  Obviously this isn't going to be a stopper since it's working, but if there's an easy fix it's going to make any other troubleshooting easier for me.  I'll be ok with finding out that the latest version woudl make this go away since I'll be moving to it soon, but needed to ask anyways.

Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Actually Edhy is right on the money.  This is the most annoying error that VS produces.  if you notice, they have the exact same signature in the error.  What this means is that there is a business assembly of (probably the StrataFrame Business assembly) in more than one location and they are not exactly the same...yet they are the same version.  This can happen when the assemblies are copied into the Bin folder, etc.  If you check all of your project folders as well as the GAC and the Common Files\MicroFour\StrataFrame folder.  I have seen this error many times in my life, and this is always the case.  It can be frustrating to track down at times also.  Sometimes when i can't find it, I will delete my local development folder altogether and get everything from source control again...as this cleans up all of the local folders.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search